diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
commit | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch) | |
tree | 326578f0505cbed07cfe60de530022822dc237ac /app/bin/csplit.c | |
parent | 16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff) |
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/bin/csplit.c')
-rw-r--r-- | app/bin/csplit.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/app/bin/csplit.c b/app/bin/csplit.c index 69642fb..6cfdcc8 100644 --- a/app/bin/csplit.c +++ b/app/bin/csplit.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/csplit.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ +/** \file csplit.c + * SPLIT */ /* XTrkCad - Model Railroad CAD @@ -20,15 +20,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include "cundo.h" #include "i18n.h" - -/***************************************************************************** - * - * SPLIT - * - */ - +#include "messages.h" +#include "track.h" +#include "utility.h" static wMenu_p splitPopupM[2]; static wMenuToggle_p splitPopupMI[2][4]; @@ -70,6 +66,7 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) switch (action) { case C_START: InfoMessage( _("Select track to split") ); + /* no break */ case C_DOWN: case C_MOVE: return C_CONTINUE; @@ -82,6 +79,11 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) onTrackInSplit = FALSE; return C_TERMINATE; } + if (!QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + onTrackInSplit = FALSE; + InfoMessage(_("Can't Split that Track")); + return C_CONTINUE; + } ep0 = PickEndPoint( pos, trk0 ); onTrackInSplit = FALSE; if (ep0 < 0) { |