]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Check for property tab contribution change. 60/4560/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 28 Oct 2020 10:10:36 +0000 (12:10 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 28 Oct 2020 12:14:34 +0000 (12:14 +0000)
gitlab #631

Change-Id: I08d2a156728298410639d236f5833c05d0ba0d9e
(cherry picked from commit d613530ca19459bcc8a75015ec28533968b92c2d)

bundles/org.simantics.selectionview/src/org/simantics/selectionview/TabbedPropertyTable.java

index 70a0c573a8cb95073c039d06996e2d6b412236b2..7f7aecd0b6e9a7b21a31f6ab077645845978968a 100644 (file)
@@ -275,15 +275,20 @@ public class TabbedPropertyTable extends Composite implements IPropertyTab {
     }
 
     protected Consumer<Collection<?>> inputCallback(final Collection<Object> selectionContents, final ISessionContext sessionContext) {
-        return new Consumer<Collection<?>>() {
+       return new Consumer<Collection<?>>() {
+               Collection<?> currentContribs  =null;
             @Override
             public void accept(final Collection<?> contribs) {
                 
-                if (isDisposed())
+                if (isDisposed()) {
+                       currentContribs = null;
                     return;
+                }
+                if (contribs != null && contribs.equals(currentContribs))
+                       return;
+                currentContribs = contribs;
 //                if (contribs.isEmpty())
 //                    return;
-
                 SimanticsUI.asyncExecSWT(TabbedPropertyTable.this, new Runnable() {
                     
                     public void run() {