summaryrefslogtreecommitdiff
path: root/app/bin/ctodesgn.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:19:41 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:19:41 +0200
commit63ec5715054be18ac4db5675e067b41c955d03b9 (patch)
tree42bb5764b05bd3bc5bffadb55f4375e6dce8a521 /app/bin/ctodesgn.c
parent6c1a798b0302034a7fdcaf93b8f014e2e458c2a0 (diff)
parente7d20cf352688bf717a01f4e6d9e6f497c2bea4c (diff)
Update upstream source from tag 'upstream/5.3.1Beta2'
Update to upstream version '5.3.1Beta2' with Debian dir 36e53756d97319b1944d0ea744717abc9326f697
Diffstat (limited to 'app/bin/ctodesgn.c')
-rw-r--r--app/bin/ctodesgn.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/app/bin/ctodesgn.c b/app/bin/ctodesgn.c
index 1b50d91..0c9a72b 100644
--- a/app/bin/ctodesgn.c
+++ b/app/bin/ctodesgn.c
@@ -35,7 +35,9 @@
#include "misc.h"
#include "common-ui.h"
+#ifndef MKTURNOUT
static int log_cornuturnoutdesigner;
+#endif
dynArr_t tempSegs_da;
char tempCustom[4096];
@@ -220,7 +222,9 @@ static paramData_t turnDesignPLs[] = {
static paramGroup_t turnDesignPG = { "turnoutNew", 0, turnDesignPLs, COUNT( turnDesignPLs ) };
static turnoutInfo_t * customTurnout1, * customTurnout2;
-static BOOL_T includeNontrackSegments;
+
+/* Copy non-track segs if there are any (Group & CustMgm/Edit) and user said yes. */
+static BOOL_T includeNontrackSegments = FALSE;
#else
int doCustomInfoLine = 1;
@@ -3085,7 +3089,7 @@ static void NewTurnOk( void * context )
fclose(f);
}
SetUserLocale();
- includeNontrackSegments = TRUE;
+ includeNontrackSegments = FALSE;
wHide( newTurnW );
DoChangeNotification( CHANGE_PARAMS );
@@ -3095,13 +3099,6 @@ static void NewTurnOk( void * context )
#ifndef MKTURNOUT
-static void NewTurnCancel( wWin_p win )
-{
- wHide( newTurnW );
- includeNontrackSegments = TRUE;
-}
-
-
static wWinPix_t turnDesignWidth;
static wWinPix_t turnDesignHeight;
@@ -3145,7 +3142,7 @@ static void SetupTurnoutDesignerW( toDesignDesc_t * newDesign )
I2VP(partnoWidth);
partnoWidth += wLabelWidth( " # " );
newTurnW = ParamCreateDialog( &turnDesignPG, _("Turnout Designer"), _("Print"),
- NewTurnPrint, NewTurnCancel, TRUE, TurnDesignLayout, F_BLOCK, NULL );
+ NewTurnPrint, ParamCancel_Current, TRUE, TurnDesignLayout, F_BLOCK, NULL );
for ( inx=0; inx<COUNT( designDescs ); inx++ ) {
designDescs[inx]->lineC = wLineCreate( turnDesignPG.win, NULL,
designDescs[inx]->lineCnt, designDescs[inx]->lines );
@@ -3265,6 +3262,7 @@ static void ShowTurnoutDesigner( void * context )
fprintf( recordF, TURNOUTDESIGNER " SHOW %s\n",
((toDesignDesc_t*)context)->label );
}
+ includeNontrackSegments = FALSE;
newTurnScaleName = curScaleName;
newTurnTrackGauge = trackGauge;
if (context && (curDesign == context)) {
@@ -3500,13 +3498,10 @@ EXPORT void EditCustomTurnout( turnoutInfo_t * to, turnoutInfo_t * to1 )
}
}
- includeNontrackSegments = TRUE;
- if ( segsDiff ) {
- if ( NoticeMessage( MSG_SEGMENTS_DIFFER, _("Yes"), _("No") ) <= 0 ) {
- includeNontrackSegments = FALSE;
- }
- } else {
- includeNontrackSegments = FALSE;
+ includeNontrackSegments = FALSE;
+ if ( segsDiff &&
+ NoticeMessage( MSG_SEGMENTS_DIFFER, _("Yes"), _("No") ) > 0 ) {
+ includeNontrackSegments = TRUE;
}
/*if (recordF)
fprintf( recordF, TURNOUTDESIGNER " SHOW %s\n", dp->label );*/
@@ -3527,7 +3522,7 @@ EXPORT void InitNewTurn( wMenu_p m )
AddPlaybackProc( message, (playbackProc_p)ShowTurnoutDesigner, designDescs[i] );
}
newTurnRoadbedColor = wDrawColorBlack;
- includeNontrackSegments = TRUE;
+ includeNontrackSegments = FALSE;
log_cornuturnoutdesigner = LogFindIndex( "cornuturnoutdesigner" );
}
#endif