diff options
author | fvogel <fvogelnew1@free.fr> | 2017-08-08 19:31:09 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-08-08 19:31:09 (GMT) |
commit | 22be4df4821b76e5bd1acb19c47e6492bdf8f58b (patch) | |
tree | 8481cbc1e91aa65071a2b0304991f169e604d460 /generic/ttk | |
parent | 69830a418063cd5919c20400bce910c04f04d933 (diff) | |
download | tk-22be4df4821b76e5bd1acb19c47e6492bdf8f58b.zip tk-22be4df4821b76e5bd1acb19c47e6492bdf8f58b.tar.gz tk-22be4df4821b76e5bd1acb19c47e6492bdf8f58b.tar.bz2 |
Fix [4966cad4d4]: Wrong tab shown in ttk::notebook. Patch from Gregor Cramer. Cherrypicked [e033e444].
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkNotebook.c | 7 |
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"); |