Issue #206 fixed dialog context deactivation bug

Former-commit-id: 9535ae2d0e [formerly b2b66e7483065e9677d8bd34f19b514c7914ef8c]
Former-commit-id: fe59c3e8d8
This commit is contained in:
Max Schenkelberg 2012-02-07 16:43:59 -06:00
parent e629c0bc38
commit 9a7efcaae8

View file

@ -158,8 +158,10 @@ public class TearOffMenuDialog extends CaveSWTDialog {
Listener deactivate = new Listener() {
@Override
public void handleEvent(Event event) {
ContextManager.getInstance(locator).deactivateContexts(
perspectiveManager);
if (Display.getCurrent().getActiveShell() == getShell()) {
ContextManager.getInstance(locator).deactivateContexts(
perspectiveManager);
}
}
};