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
54
54
55
55
private bool ChartWindowIsOpen { get { return chartWindow . Visibility == Visibility . Visible ; } }
56
56
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
+
57
60
/// <summary>
58
61
/// Constructor
59
62
/// </summary>
@@ -64,6 +67,7 @@ public DrawPathChart()
64
67
OnJsonSaveClick = OnJsonSave
65
68
} ;
66
69
TrackViewer . Localize ( chartWindow ) ;
70
+ if ( WindowTitle == null ) WindowTitle = chartWindow . Title ;
67
71
}
68
72
69
73
/// <summary>
@@ -113,6 +117,7 @@ public void Open()
113
117
{ // it path is broken, OnPathChanged performed a close
114
118
return ;
115
119
}
120
+ chartWindow . Title = String . Format ( "{0}: {1}" , WindowTitle , pathEditor . CurrentTrainPath . PathName ) ;
116
121
chartWindow . Show ( ) ;
117
122
118
123
}
@@ -160,6 +165,7 @@ private void OnPathChanged()
160
165
return ;
161
166
}
162
167
pathData . Update ( trainpath ) ;
168
+ chartWindow . Title = String . Format ( "{0}: {1}" , WindowTitle , pathEditor . CurrentTrainPath . PathName ) ;
163
169
chartWindow . Draw ( ) ;
164
170
}
165
171
You can’t perform that action at this time.
0 commit comments