feat: refactor notebook/tabs to be string based instead of fixed index based

This commit is contained in:
Ian Chua
2026-07-28 19:17:05 +08:00
parent 43725128d3
commit 56c28fc102
16 changed files with 233 additions and 136 deletions
+4 -2
View File
@@ -330,8 +330,10 @@ void Field::PostInitialize()
}
default: break;
}
if (tab_id >= 0)
wxGetApp().mainframe->select_tab(tab_id);
if (tab_id >= 0) {
static constexpr const char* kShortcutTabIds[] = {TAB_ID_HOME, TAB_ID_PREPARE, TAB_ID_PREVIEW, TAB_ID_MONITOR};
wxGetApp().mainframe->select_tab(kShortcutTabIds[tab_id]);
}
if (tab_id > 0)
// tab panel should be focused for correct navigation between tabs
wxGetApp().tab_panel()->SetFocus();