summaryrefslogtreecommitdiff
path: root/app/bin/cbezier.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-05 18:22:19 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-05 18:22:19 +0200
commit498011c44291d7d619143ce5ff3e38369d759c22 (patch)
tree5b4d1fdd686089c0c1778a462e27fa694b8f49be /app/bin/cbezier.c
parent67d0ce65dc6a1d240e271a7cd479b60aa1dc2967 (diff)
parent9a1d6eded2750572e9f5f79e53ec507dd7a06ba5 (diff)
Update upstream source from tag 'upstream/5.1.1'
Update to upstream version '5.1.1' with Debian dir 878f8cb06af8c1037570ac8774f9261ff9b12fa4
Diffstat (limited to 'app/bin/cbezier.c')
-rw-r--r--app/bin/cbezier.c15
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: