/** * The properties are copied only the first time, in this way we can save only the layers * effectively modified from the original one */ @Override public void putOriginalPropertiesInCache(AbstractMementoOriginalProperties memento) { boolean treeInitialized = (Boolean) Registry.get(UserSessionEnum.TREE_LOADED.name()); if (treeInitialized) { if (memento != null && !this.modifiedLayersMap.containsKey(memento.getRefBaseElement())) { this.modifiedLayersMap.put(memento.getRefBaseElement(), memento); if (super.peek() == null) { this.observable.setChanged(); this.observable.notifyObservers(LayerEvents.SAVE_CACHE_NOT_EMPTY); /*System.out.println("Event SAVE_CACHE_NOT_EMPTY notified to " + this.observable.countObservers() + " observers");*/ } } } }