summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkNotebook.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 83d7db9..437ae11 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -595,8 +595,12 @@ static void NotebookPlaceSlaves(void *recordPtr)
Notebook *nb = recordPtr;
int currentIndex = nb->notebook.currentIndex;
if (currentIndex >= 0) {
+ int activeIndex = nb->notebook.activeIndex;
+ int index = (activeIndex >= 0) ? activeIndex : currentIndex;
NotebookDoLayout(nb);
- NotebookPlaceSlave(nb, currentIndex);
+ if (index >= 0) {
+ NotebookPlaceSlave(nb, index);
+ }
}
}