]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/prioritystack/PriorityStack.java
Improved clearing of CanvasContext
[simantics/platform.git] / bundles / org.simantics.utils.datastructures / src / org / simantics / utils / datastructures / prioritystack / PriorityStack.java
index 81029105d203b77c32fc92171fd9d4622918f28c..6c0a36acd514f329f8cd06d7b76ec6d8bc58a2f4 100644 (file)
@@ -197,5 +197,15 @@ public class PriorityStack<E> implements IPriorityStack<E> {
        public String toString() {
            return EString.implode(snapshotArray, "\n");
        }
+       
+       public void clear() {
+               if (list != null) {
+                       list.clear();
+               }
+               if (listeners != null) {
+                       listeners.clear();
+               }
+               snapshotArray = createArray(0);
+       }
 
 }