mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
Some actions do not register with Undo/Redo mechanism: project font,
layer settings, group/ungroup.
This commit is contained in:
@@ -255,6 +255,31 @@ public class Project implements Serializable {
|
||||
if (other.width != null)
|
||||
return false;
|
||||
} else if (!width.equals(other.width))
|
||||
return false;
|
||||
if (gridSpacing == null) {
|
||||
if (other.gridSpacing != null)
|
||||
return false;
|
||||
} else if (!gridSpacing.equals(other.gridSpacing))
|
||||
return false;
|
||||
if (font == null) {
|
||||
if (other.font != null)
|
||||
return false;
|
||||
} else if (!font.equals(other.font))
|
||||
return false;
|
||||
if (groups == null) {
|
||||
if (other.groups != null)
|
||||
return false;
|
||||
} else if (!groups.equals(other.groups))
|
||||
return false;
|
||||
if (lockedLayers == null) {
|
||||
if (other.lockedLayers != null)
|
||||
return false;
|
||||
} else if (!lockedLayers.equals(other.lockedLayers))
|
||||
return false;
|
||||
if (hiddenLayers == null) {
|
||||
if (other.hiddenLayers != null)
|
||||
return false;
|
||||
} else if (!hiddenLayers.equals(other.hiddenLayers))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1592,6 +1592,7 @@ public class Presenter implements IPlugInPort {
|
||||
@Override
|
||||
public void setLayerLocked(int layerZOrder, boolean locked) {
|
||||
LOG.info(String.format("setLayerLocked(%s, %s)", layerZOrder, locked));
|
||||
Project oldProject = currentProject.clone();
|
||||
if (locked) {
|
||||
currentProject.getLockedLayers().add(layerZOrder);
|
||||
} else {
|
||||
@@ -1600,11 +1601,16 @@ public class Presenter implements IPlugInPort {
|
||||
updateSelection(EMPTY_SELECTION);
|
||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||
messageDispatcher.dispatchMessage(EventType.LAYER_STATE_CHANGED, currentProject.getLockedLayers());
|
||||
if (!oldProject.equals(currentProject)) {
|
||||
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, currentProject.clone(), locked ? "Lock Layer" : "Unlock Layer");
|
||||
projectFileManager.notifyFileChange();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLayerVisibility(int layerZOrder, boolean visible) {
|
||||
LOG.info(String.format("setLayerVisibility(%s, %s)", layerZOrder, visible));
|
||||
Project oldProject = currentProject.clone();
|
||||
if (visible) {
|
||||
currentProject.getHiddenLayers().remove(layerZOrder);
|
||||
} else {
|
||||
@@ -1613,6 +1619,10 @@ public class Presenter implements IPlugInPort {
|
||||
updateSelection(EMPTY_SELECTION);
|
||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||
messageDispatcher.dispatchMessage(EventType.LAYER_VISIBILITY_CHANGED, currentProject.getHiddenLayers());
|
||||
if (!oldProject.equals(currentProject)) {
|
||||
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, currentProject.clone(), visible ? "Show Layer" : "Hide Layer");
|
||||
projectFileManager.notifyFileChange();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -2140,7 +2140,7 @@
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added "Label Orientation" property to leaded components that can be used to force labels to be rendered horizontally instead of following component placement direction</description>
|
||||
<description>Added "Label Orientation" property to leaded components that can be used to force component labels to be rendered horizontally instead of following component placement direction</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
@@ -2169,10 +2169,14 @@
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Project font gets reverted to "Square721 BT" on Undo</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>When loaded from an existing file "Potentiometer Symbol" doesn't retain the specified orientation</description>
|
||||
<description>Some actions do not register with Undo/Redo mechanism: project font, layer settings, group/ungroup</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>When loaded from an existing file, "Potentiometer Symbol" doesn't retain the specified orientation</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
|
||||
Reference in New Issue
Block a user