summaryrefslogtreecommitdiff
path: root/app/bin/cparalle.c
diff options
context:
space:
mode:
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 ) ) {