mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Added "Renumber On Paste" option in the "Config" menu
This commit is contained in:
@@ -411,7 +411,7 @@ public class ActionFactory {
|
||||
presenter.loadProjectFromFile(file.getAbsolutePath());
|
||||
// Grab all components and paste them into the main
|
||||
// presenter
|
||||
plugInPort.pasteComponents(presenter.getCurrentProject().getComponents(), false);
|
||||
plugInPort.pasteComponents(presenter.getCurrentProject().getComponents(), false, false);
|
||||
// Cleanup components in the temp presenter, don't need
|
||||
// them anymore
|
||||
presenter.selectAll(0);
|
||||
@@ -1107,7 +1107,7 @@ public class ActionFactory {
|
||||
try {
|
||||
List<IDIYComponent<?>> components =
|
||||
(List<IDIYComponent<?>>) clipboard.getData(ComponentTransferable.listFlavor);
|
||||
plugInPort.pasteComponents(cloneComponents(components), false);
|
||||
plugInPort.pasteComponents(cloneComponents(components), false, ConfigurationManager.getInstance().readBoolean(Presenter.RENUMBER_ON_PASTE_KEY, true));
|
||||
} catch (Exception ex) {
|
||||
LOG.error("Coule not paste.", ex);
|
||||
}
|
||||
|
||||
@@ -94,6 +94,9 @@ public class ConfigPlugin implements IPlugIn {
|
||||
swingUI.injectMenuAction(
|
||||
ActionFactory.getInstance().createConfigAction(plugInPort, "Outline Mode", IPlugInPort.OUTLINE_KEY, false),
|
||||
CONFIG_MENU);
|
||||
swingUI.injectMenuAction(
|
||||
ActionFactory.getInstance().createConfigAction(plugInPort, "Renumber On Paste", IPlugInPort.RENUMBER_ON_PASTE_KEY, true),
|
||||
CONFIG_MENU);
|
||||
swingUI.injectMenuAction(
|
||||
ActionFactory.getInstance().createConfigAction(plugInPort, "Show Rulers", IPlugInPort.SHOW_RULERS_KEY, true),
|
||||
CONFIG_MENU);
|
||||
|
||||
Reference in New Issue
Block a user