mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Two components are created instead of one
This commit is contained in:
+3
-5
@@ -193,11 +193,9 @@ class CanvasPanel extends JComponent implements Autoscroll {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getButton() == MouseEvent.BUTTON1) {
|
||||
plugInPort.mouseClicked(e.getPoint(), e.getButton(), e
|
||||
.isControlDown(), e.isShiftDown(), e.isAltDown(), e
|
||||
.getClickCount());
|
||||
}
|
||||
plugInPort.mouseClicked(e.getPoint(), e.getButton(), e
|
||||
.isControlDown(), e.isShiftDown(), e.isAltDown(), e
|
||||
.getClickCount());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+1
-5
@@ -31,7 +31,6 @@ import org.diylc.common.BadPositionException;
|
||||
import org.diylc.common.EventType;
|
||||
import org.diylc.common.IPlugIn;
|
||||
import org.diylc.common.IPlugInPort;
|
||||
import org.diylc.core.CreationMethod;
|
||||
import org.diylc.core.ExpansionMode;
|
||||
import org.diylc.core.IDIYComponent;
|
||||
import org.diylc.core.measures.Size;
|
||||
@@ -102,10 +101,7 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
if (plugInPort.getNewComponentTypeSlot() != null && plugInPort.getNewComponentTypeSlot().getCreationMethod() == CreationMethod.SINGLE_CLICK) {
|
||||
plugInPort.mouseClicked(e.getPoint(), e.getButton(),
|
||||
false, false, false, e.getClickCount());
|
||||
} else if (e.isPopupTrigger()) {
|
||||
if (plugInPort.getNewComponentTypeSlot() == null && e.isPopupTrigger()) {
|
||||
// Enable actions.
|
||||
boolean enabled = !plugInPort.getSelectedComponents()
|
||||
.isEmpty();
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
<minor>11</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2012-08-20 21:00:00.000 CET</releaseDate>
|
||||
<releaseDate>2012-08-21 20:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
@@ -723,13 +723,17 @@
|
||||
<minor>12</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2012-08-20 21:00:00.000 CET</releaseDate>
|
||||
<releaseDate>2012-08-22 20:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Rectangle selection triggers file (modified) state</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Two components are created instead of one</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Auto-Edit opens the editor on for components that make sense (e.g. NOT for traces, solder pads, etc)</description>
|
||||
|
||||
Reference in New Issue
Block a user