Commit 9cd1d4b7 authored by Simon Barner's avatar Simon Barner
Browse files

Avoid infinite selection update bouncing between editors and navigator

Issue-Ref: 3535
Issue-Url: https://af3-developer.fortiss.org/issues/3535

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent e332be9b
......@@ -7,7 +7,7 @@ EObjectSelectionUtils.java 928280b5dd3bb634debc1ac3be9f15b4e45f2683 GREEN
KernelUIUtils.java b038a28a44e17e5bca4d71f5dee70ee92e5324b9 GREEN
ObservableUtils.java 2ffced494a86bd7e8f8eb8882aec38b06f0f2818 GREEN
PropertiesConstantUtils.java 59b1a1e4d594bb98db3aa396f2ff6474ba405920 GREEN
SelectionUtils.java 136096917a2357678c54339543a14fc3a63edf6d GREEN
SelectionUtils.java 3d20f87eaaee04173686ef62b09ca6971702cd00 YELLOW
TutorialUIServiceUtils.java 416970bb9bd305acee064e2ac199df39cc98b475 GREEN
UndoRedoImpl.java f218500875bda0ef52f4cc2ccdf452825e6751f7 GREEN
WidgetsFactory.java e92285bee3189ecf1a3fbaede3c4ffb237fc81ed GREEN
......@@ -143,7 +143,9 @@ public class SelectionUtils {
ISelection selection = new StructuredSelection(eObjects);
if(updateNavigator) {
INavigatorService ns = INavigatorService.getInstance();
ns.setCurrentSelection(selection);
if(!selectAll(ns.getCurrentSelection(), Object.class).containsAll(eObjects)) {
ns.setCurrentSelection(selection);
}
}
if(!updateActiveEditor) {
......@@ -164,6 +166,8 @@ public class SelectionUtils {
return;
}
selectionProvider.setSelection(selection);
if(!selectAll(selectionProvider.getSelection(), Object.class).containsAll(eObjects)) {
selectionProvider.setSelection(selection);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment