mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
added send to back/bring to front
This commit is contained in:
+12
@@ -908,6 +908,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
@Override
|
@Override
|
||||||
public void sendSelectionToBack() {
|
public void sendSelectionToBack() {
|
||||||
LOG.info("sendSelectionToBack()");
|
LOG.info("sendSelectionToBack()");
|
||||||
|
Project oldProject = cloner.deepClone(currentProject);
|
||||||
for (IDIYComponent<?> component : selectedComponents) {
|
for (IDIYComponent<?> component : selectedComponents) {
|
||||||
ComponentType componentType = ComponentProcessor.getInstance()
|
ComponentType componentType = ComponentProcessor.getInstance()
|
||||||
.extractComponentTypeFrom(
|
.extractComponentTypeFrom(
|
||||||
@@ -925,12 +926,18 @@ public class Presenter implements IPlugInPort {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!oldProject.equals(currentProject)) {
|
||||||
|
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, cloner
|
||||||
|
.deepClone(currentProject), "Send to Back");
|
||||||
|
projectFileManager.notifyFileChange();
|
||||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void bringSelectionToFront() {
|
public void bringSelectionToFront() {
|
||||||
LOG.info("bringSelectionToFront()");
|
LOG.info("bringSelectionToFront()");
|
||||||
|
Project oldProject = cloner.deepClone(currentProject);
|
||||||
for (IDIYComponent<?> component : selectedComponents) {
|
for (IDIYComponent<?> component : selectedComponents) {
|
||||||
ComponentType componentType = ComponentProcessor.getInstance()
|
ComponentType componentType = ComponentProcessor.getInstance()
|
||||||
.extractComponentTypeFrom(
|
.extractComponentTypeFrom(
|
||||||
@@ -948,8 +955,13 @@ public class Presenter implements IPlugInPort {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!oldProject.equals(currentProject)) {
|
||||||
|
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, oldProject, cloner
|
||||||
|
.deepClone(currentProject), "Bring to Front");
|
||||||
|
projectFileManager.notifyFileChange();
|
||||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the selection with the specified {@link ComponentTransferable}.
|
* Updates the selection with the specified {@link ComponentTransferable}.
|
||||||
|
|||||||
Reference in New Issue
Block a user