File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Source/Contrib/TrackViewer/Editing/Charts Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ public class DrawPathChart
5454
5555 private bool ChartWindowIsOpen { get { return chartWindow . Visibility == Visibility . Visible ; } }
5656
57+ // save window title from properies, so that the window's title can be changed when the selected path is changed
58+ private readonly String WindowTitle ;
59+
5760 /// <summary>
5861 /// Constructor
5962 /// </summary>
@@ -64,6 +67,7 @@ public DrawPathChart()
6467 OnJsonSaveClick = OnJsonSave
6568 } ;
6669 TrackViewer . Localize ( chartWindow ) ;
70+ if ( WindowTitle == null ) WindowTitle = chartWindow . Title ;
6771 }
6872
6973 /// <summary>
@@ -113,6 +117,7 @@ public void Open()
113117 { // it path is broken, OnPathChanged performed a close
114118 return ;
115119 }
120+ chartWindow . Title = String . Format ( "{0}: {1}" , WindowTitle , pathEditor . CurrentTrainPath . PathName ) ;
116121 chartWindow . Show ( ) ;
117122
118123 }
@@ -160,6 +165,7 @@ private void OnPathChanged()
160165 return ;
161166 }
162167 pathData . Update ( trainpath ) ;
168+ chartWindow . Title = String . Format ( "{0}: {1}" , WindowTitle , pathEditor . CurrentTrainPath . PathName ) ;
163169 chartWindow . Draw ( ) ;
164170 }
165171
You can’t perform that action at this time.
0 commit comments