diff options
author | Simeon Andreev | 2017-12-08 14:35:19 +0000 |
---|---|---|
committer | Simeon Andreev | 2018-01-05 14:41:59 +0000 |
commit | 08ea543810619de5ab631ec2caca8ea2b5f5b7bc (patch) | |
tree | 0962c57fa8057f3f81331348d9d234d1c64a2306 | |
parent | a8a92a1b007b7537adf6affc8ed777ae556e68ba (diff) | |
download | eclipse.platform.swt-08ea543810619de5ab631ec2caca8ea2b5f5b7bc.tar.gz eclipse.platform.swt-08ea543810619de5ab631ec2caca8ea2b5f5b7bc.tar.xz eclipse.platform.swt-08ea543810619de5ab631ec2caca8ea2b5f5b7bc.zip |
Bug 528251 - view CTabFolders result in not highlighted part stack tab
When a view contains a selected CTabFolder, selecting another view in
the same part stack results in non-highlighted view tab. This is the
case, since CTabFolder.onActivate/onDeactivate will tell ancestor
CTabFolders to highlight resp. not highlight. Selecting another view
results in deactivating the nested CTabFolder and so removing
highlighting from the part stack tabs. This regression was introduced
with the fix for Bug 474444.
With this change, highlighting is toggled only for the CTabFolder which
is being activated/deactivated. The change was verified both on Windows
and on RHEL+GTK3.14. The problem from Bug 474444 is not observed.
Change-Id: I6fd4bf7f049e84d95bd5e83332a6484164623576
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index ecffcf52b8..cc547cab1e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -370,13 +370,7 @@ void onDeactivate(Event event) { if (!highlightEnabled) { return; } - Composite current = this; - while (current != null) { - if (current instanceof CTabFolder) { - ((CTabFolder) current).highlight = false; - } - current = current.getParent(); - } + this.highlight = false; redraw(); } @@ -384,13 +378,7 @@ void onActivate(Event event) { if (!highlightEnabled) { return; } - Composite current = this; - while (current != null) { - if (current instanceof CTabFolder) { - ((CTabFolder) current).highlight = true; - } - current = current.getParent(); - } + this.highlight = true; redraw(); } |