mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
improve bring to front/back
This commit is contained in:
@@ -1536,6 +1536,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
} else
|
} else
|
||||||
while (index > 0) {
|
while (index > 0) {
|
||||||
IDIYComponent<?> componentBefore = currentProject.getComponents().get(index - 1);
|
IDIYComponent<?> componentBefore = currentProject.getComponents().get(index - 1);
|
||||||
|
if (!selectedComponents.contains(componentBefore)) {
|
||||||
ComponentType componentBeforeType =
|
ComponentType componentBeforeType =
|
||||||
ComponentProcessor.getInstance().extractComponentTypeFrom(
|
ComponentProcessor.getInstance().extractComponentTypeFrom(
|
||||||
(Class<? extends IDIYComponent<?>>) componentBefore.getClass());
|
(Class<? extends IDIYComponent<?>>) componentBefore.getClass());
|
||||||
@@ -1548,6 +1549,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
"Selected component(s) have reached the bottom of their layer. Do you want to force the selection to the back?",
|
"Selected component(s) have reached the bottom of their layer. Do you want to force the selection to the back?",
|
||||||
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
|
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
Collections.swap(currentProject.getComponents(), index, index - 1);
|
Collections.swap(currentProject.getComponents(), index, index - 1);
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
@@ -1587,6 +1589,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
} else
|
} else
|
||||||
while (index < currentProject.getComponents().size() - 1) {
|
while (index < currentProject.getComponents().size() - 1) {
|
||||||
IDIYComponent<?> componentAfter = currentProject.getComponents().get(index + 1);
|
IDIYComponent<?> componentAfter = currentProject.getComponents().get(index + 1);
|
||||||
|
if (!selectedComponents.contains(componentAfter)) {
|
||||||
ComponentType componentAfterType =
|
ComponentType componentAfterType =
|
||||||
ComponentProcessor.getInstance().extractComponentTypeFrom(
|
ComponentProcessor.getInstance().extractComponentTypeFrom(
|
||||||
(Class<? extends IDIYComponent<?>>) componentAfter.getClass());
|
(Class<? extends IDIYComponent<?>>) componentAfter.getClass());
|
||||||
@@ -1599,6 +1602,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
"Selected component(s) have reached the bottom of their layer. Do you want to force the selection to the back?",
|
"Selected component(s) have reached the bottom of their layer. Do you want to force the selection to the back?",
|
||||||
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
|
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
Collections.swap(currentProject.getComponents(), index, index + 1);
|
Collections.swap(currentProject.getComponents(), index, index + 1);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1768,7 +1768,7 @@
|
|||||||
</org.diylc.appframework.update.Change>
|
</org.diylc.appframework.update.Change>
|
||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>NEW_FEATURE</changeType>
|
<changeType>NEW_FEATURE</changeType>
|
||||||
<description>Ability to force components to the front or back of other components even outisde their designated layer</description>
|
<description>Ability to force components to the front or back of other components even outisde their designated layers, allowing placing components or jumpers below boards, etc.</description>
|
||||||
</org.diylc.appframework.update.Change>
|
</org.diylc.appframework.update.Change>
|
||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
|
|||||||
Reference in New Issue
Block a user