diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-05 18:22:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-05 18:22:00 +0200 |
commit | 9a1d6eded2750572e9f5f79e53ec507dd7a06ba5 (patch) | |
tree | 10d84c82031aace7ac819f27116a04e7da238d59 /app/bin/cbezier.c | |
parent | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff) |
New upstream version 5.1.1upstream/5.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: |