mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 10:12:17 +10:00
improve bring to front/send to back
This commit is contained in:
-4
@@ -950,11 +950,9 @@ public class Presenter implements IPlugInPort {
|
||||
ComponentType componentBeforeType = ComponentProcessor.getInstance()
|
||||
.extractComponentTypeFrom(
|
||||
(Class<? extends IDIYComponent<?>>) componentBefore.getClass());
|
||||
if (componentType.getZOrder() == componentBeforeType.getZOrder()) {
|
||||
Collections.swap(currentProject.getComponents(), index, index - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!oldProject.equals(currentProject)) {
|
||||
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, cloner
|
||||
.deepClone(currentProject), "Send to Back");
|
||||
@@ -979,11 +977,9 @@ public class Presenter implements IPlugInPort {
|
||||
ComponentType componentAfterType = ComponentProcessor.getInstance()
|
||||
.extractComponentTypeFrom(
|
||||
(Class<? extends IDIYComponent<?>>) componentAfter.getClass());
|
||||
if (componentType.getZOrder() == componentAfterType.getZOrder()) {
|
||||
Collections.swap(currentProject.getComponents(), index, index + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!oldProject.equals(currentProject)) {
|
||||
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, cloner
|
||||
.deepClone(currentProject), "Bring to Front");
|
||||
|
||||
Reference in New Issue
Block a user