mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
continuous component creation
This commit is contained in:
+1
@@ -39,6 +39,7 @@ public interface IPlugInPort {
|
||||
public static final String METRIC_KEY = "metric";
|
||||
public static final String SNAP_TO_GRID_KEY = "snapToGrid";
|
||||
public static final String AUTO_PADS_KEY = "autoCreatePads";
|
||||
public static final String CONTINUOUS_CREATION_KEY = "continuousCreation";
|
||||
|
||||
/**
|
||||
* Returns size of the canvas that takes project dimensions into account as
|
||||
|
||||
+12
-2
@@ -379,7 +379,12 @@ public class Presenter implements IPlugInPort {
|
||||
LOG.error("Error instatiating component of type: "
|
||||
+ componentTypeSlot.getInstanceClass().getName(), e);
|
||||
}
|
||||
setNewComponentTypeSlot(null);
|
||||
if (ConfigurationManager.getInstance().readBoolean(
|
||||
IPlugInPort.CONTINUOUS_CREATION_KEY, false)) {
|
||||
setNewComponentTypeSlot(componentTypeSlot);
|
||||
} else {
|
||||
setNewComponentTypeSlot(null);
|
||||
}
|
||||
break;
|
||||
case POINT_BY_POINT:
|
||||
// First click is just to set the controlPointSlot and
|
||||
@@ -411,7 +416,12 @@ public class Presenter implements IPlugInPort {
|
||||
}
|
||||
updateSelection(newSelection);
|
||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||
setNewComponentTypeSlot(null);
|
||||
if (ConfigurationManager.getInstance().readBoolean(
|
||||
IPlugInPort.CONTINUOUS_CREATION_KEY, false)) {
|
||||
setNewComponentTypeSlot(componentTypeSlot);
|
||||
} else {
|
||||
setNewComponentTypeSlot(null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
+2
@@ -50,6 +50,8 @@ public class ConfigPlugin implements IPlugIn {
|
||||
"Snap to Grid", IPlugInPort.SNAP_TO_GRID_KEY, true), CONFIG_MENU);
|
||||
swingUI.injectMenuAction(ActionFactory.getInstance().createConfigAction(plugInPort,
|
||||
"Auto-Create Pads", IPlugInPort.AUTO_PADS_KEY, false), CONFIG_MENU);
|
||||
swingUI.injectMenuAction(ActionFactory.getInstance().createConfigAction(plugInPort,
|
||||
"Continuous Creation", IPlugInPort.CONTINUOUS_CREATION_KEY, false), CONFIG_MENU);
|
||||
File themeDir = new File("themes");
|
||||
if (themeDir.exists()) {
|
||||
XStream xStream = new XStream(new DomDriver());
|
||||
|
||||
Reference in New Issue
Block a user