]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java
enhance management of context menus and commands. Remove a few bugs.
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui / src / main / java / org / argeo / slc / client / ui / model / ResultParent.java
index ecbffcae4a863cc0e3c1be5a10154f07d3f28d9a..a616cc4ff7c085a153f2f90bd30c3af66ded049d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,16 +39,19 @@ public abstract class ResultParent extends TreeParent {
 
        @Override
        public synchronized boolean hasChildren() {
+               // only initialize when needed : correctly called by the jface framework
                if (!isLoaded())
                        initialize();
                return super.hasChildren();
        }
 
        public void forceFullRefresh() {
-               clearChildren();
+               // if (isDisposed)
+               // return;
+               if (hasChildren())
+                       clearChildren();
                initialize();
        }
 
        protected abstract void initialize();
-
 }