diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
| commit | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (patch) | |
| tree | cfd2ef9b569f49af985a6f1ec44f2614f63c8e78 /app/bin/ctodesgn.c | |
| parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) | |
New upstream version 5.3.1Beta2upstream/5.3.1Beta2
Diffstat (limited to 'app/bin/ctodesgn.c')
| -rw-r--r-- | app/bin/ctodesgn.c | 31 | 
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  | 
