diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-10 23:05:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-10 23:05:17 +0200 |
commit | c120c7bcbcf115ecc2a6668f4c7f45b3d4a5bc86 (patch) | |
tree | 5550610553d1b1d7236d052b6e956b22e0bb4883 /app/bin/cbezier.c | |
parent | 67d0ce65dc6a1d240e271a7cd479b60aa1dc2967 (diff) | |
parent | 26d299964db18cb71c2c6a5be4864479ba82d54f (diff) |
Merge branch 'release/debian/5.1.1-1'debian/5.1.1-1
Diffstat (limited to 'app/bin/cbezier.c')
-rw-r--r-- | app/bin/cbezier.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/bin/cbezier.c b/app/bin/cbezier.c index 92855c1..b91a81e 100644 --- a/app/bin/cbezier.c +++ b/app/bin/cbezier.c @@ -101,6 +101,7 @@ static struct { track_p selectTrack; BOOL_T track; DIST_T minRadius; + DIST_T trackGauge; } Da; @@ -497,11 +498,11 @@ EXPORT void DrawBezCurve(trkSeg_p control_arm1, tempD.orig = mainD.orig; tempD.angle = mainD.angle; if (crvSegs_cnt && curveSegs) - DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, trackGauge, color ); + DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, Da.trackGauge, color ); if (cp1Segs_cnt && control_arm1) - DrawSegs( &tempD, zero, 0.0, control_arm1, cp1Segs_cnt, trackGauge, drawColorBlack ); + DrawSegs( &tempD, zero, 0.0, control_arm1, cp1Segs_cnt, Da.trackGauge, drawColorBlack ); if (cp2Segs_cnt && control_arm2) - DrawSegs( &tempD, zero, 0.0, control_arm2, cp2Segs_cnt, trackGauge, drawColorBlack ); + DrawSegs( &tempD, zero, 0.0, control_arm2, cp2Segs_cnt, Da.trackGauge, drawColorBlack ); tempD.funcs->options = oldDrawOptions; tempD.options = oldOptions; @@ -803,7 +804,7 @@ struct extraData { * Note: Available points are shown - if a Bezier track is attached to its neighbor, only the control point on that side is selectable. * Any free end-point can be locked to a unconnected end point using SHIFT during drag. */ -STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos) { +STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) { BOOL_T track = TRUE; track_p t; double width = 1.0; @@ -812,7 +813,7 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos) { struct extraData *xx = GetTrkExtraData(trk); cmd = (long)commandContext; - + Da.trackGauge = trackG; switch (action&0xFF) { case C_START: @@ -867,6 +868,8 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos) { if (Da.track) t = NewBezierTrack( Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); else t = NewBezierLine(Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt,xx->bezierData.segsColor,xx->bezierData.segsWidth); + if (Da.track) CopyAttributes( trk, t ); + DeleteTrack(trk, TRUE); if (Da.track) { @@ -955,6 +958,8 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) Da.color = lineColor; Da.width = (double)lineWidth/mainD.dpi; + Da.trackGauge = trackGauge; + switch (action&0xFF) { case C_START: |