improve bring to front/back

This commit is contained in:
bancika
2017-04-27 13:17:14 +02:00
parent d211ea6ffc
commit ccf6e7bb7e
2 changed files with 29 additions and 25 deletions
@@ -1536,6 +1536,7 @@ public class Presenter implements IPlugInPort {
} else
while (index > 0) {
IDIYComponent<?> componentBefore = currentProject.getComponents().get(index - 1);
if (!selectedComponents.contains(componentBefore)) {
ComponentType componentBeforeType =
ComponentProcessor.getInstance().extractComponentTypeFrom(
(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?",
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
break;
}
Collections.swap(currentProject.getComponents(), index, index - 1);
index--;
}
@@ -1587,6 +1589,7 @@ public class Presenter implements IPlugInPort {
} else
while (index < currentProject.getComponents().size() - 1) {
IDIYComponent<?> componentAfter = currentProject.getComponents().get(index + 1);
if (!selectedComponents.contains(componentAfter)) {
ComponentType componentAfterType =
ComponentProcessor.getInstance().extractComponentTypeFrom(
(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?",
"Send Selection to Back", IView.YES_NO_OPTION, IView.QUESTION_MESSAGE)) != IView.YES_OPTION)
break;
}
Collections.swap(currentProject.getComponents(), index, index + 1);
index++;
}
+1 -1
View File
@@ -1768,7 +1768,7 @@
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<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>
<changeType>IMPROVEMENT</changeType>