diff options
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) { |