diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
commit | 1542c122b3672fe83e027411ad2445772e2d0ed3 (patch) | |
tree | e535bc621bd7ffa9d5ce89e0d495df5d1c4ab6fd /app/bin/cparalle.c | |
parent | 773810e6583142d7d15263e6481c42aebed6d7f1 (diff) | |
parent | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff) |
Update upstream source from tag 'upstream/5.1.0'
Update to upstream version '5.1.0'
with Debian dir 93ca74b8b4602fce4c9c7740e0cfdde25f086673
Diffstat (limited to 'app/bin/cparalle.c')
-rw-r--r-- | app/bin/cparalle.c | 15 |
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 ) ) { |