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