File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ public override ModelObject? ownerObject {
4545 internal set => throw new NotSupportedException ( ) ;
4646 }
4747
48+ public void AssureFirstPage ( ) {
49+ if ( pages . Count == 0 ) {
50+ ProjectPage firstPage = new ProjectPage ( this , typeof ( ProductionTable ) ) ;
51+ pages . Add ( firstPage ) ;
52+ pagesByGuid [ firstPage . guid ] = firstPage ;
53+
54+ displayPages . Add ( firstPage . guid ) ;
55+ }
56+ }
57+
4858 private void UpdatePageMapping ( ) {
4959 hiddenPages = 0 ;
5060 pagesByGuid . Clear ( ) ;
Original file line number Diff line number Diff line change @@ -79,15 +79,7 @@ private void SetProject(Project project) {
7979 this . project = project ;
8080 if ( project . justCreated ) {
8181 _ = ShowPseudoScreen ( new MilestonesPanel ( ) ) ;
82- }
83-
84- if ( project . pages . Count == 0 ) {
85- ProjectPage firstPage = new ProjectPage ( project , typeof ( ProductionTable ) ) ;
86- project . pages . Add ( firstPage ) ;
87- }
88-
89- if ( project . displayPages . Count == 0 ) {
90- project . displayPages . Add ( project . pages [ 0 ] . guid ) ;
82+ project . AssureFirstPage ( ) ;
9183 }
9284
9385 // Hack to activate all page solvers for the summary view
You can’t perform that action at this time.
0 commit comments