summaryrefslogtreecommitdiff
path: root/app/bin/cparalle.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:55:58 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:55:58 +0100
commitd1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch)
tree326578f0505cbed07cfe60de530022822dc237ac /app/bin/cparalle.c
parent16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff)
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/bin/cparalle.c')
-rw-r--r--app/bin/cparalle.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/bin/cparalle.c b/app/bin/cparalle.c
index 28e3513..8e70408 100644
--- a/app/bin/cparalle.c
+++ b/app/bin/cparalle.c
@@ -1,8 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cparalle.c,v 1.5 2009-05-25 18:11:03 m_fischer Exp $
- *
+/** \file cparalle.c
* PARALLEL
- *
*/
/* XTrkCad - Model Railroad CAD
@@ -23,10 +20,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "track.h"
+#include <math.h>
+
#include "ccurve.h"
#include "cstraigh.h"
+#include "cundo.h"
#include "i18n.h"
+#include "messages.h"
+#include "param.h"
+#include "track.h"
+#include "utility.h"
static struct {
track_p Trk;
@@ -90,6 +93,7 @@ static STATUS_T CmdParallel( wAction_t action, coOrd pos )
}
if ( !QueryTrack( Dpa.Trk, Q_CAN_PARALLEL ) ) {
Dpa.Trk = NULL;
+ InfoMessage(_(" Track doesn't support parallel"));
return C_CONTINUE;
}
/* in case query has changed things (eg joint) */
@@ -101,6 +105,7 @@ static STATUS_T CmdParallel( wAction_t action, coOrd pos )
tempSegs_da.cnt = 0;
case C_MOVE:
+
if (Dpa.Trk == NULL) return C_CONTINUE;
DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack );
if ( !MakeParallelTrack( Dpa.Trk, pos, parSeparation, NULL, &p0, &p1 ) ) {