From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/bin/cparalle.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'app/bin/cparalle.c') 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 + #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 ) ) { -- cgit v1.2.3