summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-08-08 19:29:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-08-08 19:29:01 (GMT)
commita1a46b89bc396be3cc3cb76638f7d885c33d3a45 (patch)
treedb8f030a9f2a3a8acc06d9f65f3812c694819cef
parent7aa317ac90ec3f84b8e89ff3f3b3f653101e5e1e (diff)
parent8c45875e96c234b4fea7bf54e3206638253bdd8d (diff)
downloadtk-a1a46b89bc396be3cc3cb76638f7d885c33d3a45.zip
tk-a1a46b89bc396be3cc3cb76638f7d885c33d3a45.tar.gz
tk-a1a46b89bc396be3cc3cb76638f7d885c33d3a45.tar.bz2
Fix [4966cad4d4]: Wrong tab shown in ttk::notebook. Patch from Gregor Cramer.
-rw-r--r--generic/ttk/ttkNotebook.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 83d7db9..56439a6 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -627,9 +627,12 @@ static void SelectTab(Notebook *nb, int index)
Ttk_UnmapSlave(nb->notebook.mgr, currentIndex);
}
- NotebookPlaceSlave(nb, index);
-
+ /* Must be set before calling NotebookPlaceSlave(), otherwise it may
+ * happen that NotebookPlaceSlaves(), triggered by an interveaning
+ * geometry request, will swap to old index. */
nb->notebook.currentIndex = index;
+
+ NotebookPlaceSlave(nb, index);
TtkRedisplayWidget(&nb->core);
TtkSendVirtualEvent(nb->core.tkwin, "NotebookTabChanged");