Skip to content
Snippets Groups Projects
Commit 5f75f523 authored by rhenck's avatar rhenck
Browse files

[editor] Fix selected tab after adding new page

parent f82a3455
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ export class UnitViewComponent implements OnInit, OnDestroy { ...@@ -61,7 +61,7 @@ export class UnitViewComponent implements OnInit, OnDestroy {
addPage(): void { addPage(): void {
this.unitService.addPage(); this.unitService.addPage();
this.selectedPageIndex += this.unit.pages.length - 1; this.selectedPageIndex = this.unit.pages.length - 1;
this.selectionService.setSelectedPageSection(this.unit.pages[this.selectedPageIndex].sections[0]); this.selectionService.setSelectedPageSection(this.unit.pages[this.selectedPageIndex].sections[0]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment