From dd53cfe5693e72d44bd43e1a16cbe0b838a2cf8d Mon Sep 17 00:00:00 2001 From: bancika Date: Thu, 20 Jan 2011 21:52:51 +0000 Subject: [PATCH] don't allow selection rect when creating new update selection when dropped --- .../DIYLC/src/org/diylc/presenter/Presenter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/Presenter.java b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/Presenter.java index d3a7cf20..300dc747 100644 --- a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/Presenter.java +++ b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/Presenter.java @@ -692,7 +692,8 @@ public class Presenter implements IPlugInPort { } } } - } else if (selectedComponents.isEmpty()) { + } else if (selectedComponents.isEmpty() + && instantiationManager.getComponentTypeSlot() == null) { // If there's no selection, the only thing to do is update the // selection rectangle and refresh. Rectangle oldSelectionRect = selectionRect == null ? null @@ -736,6 +737,8 @@ public class Presenter implements IPlugInPort { // selectedComponents); // messageDispatcher.dispatchMessage(EventType.SELECTION_SIZE_CHANGED, // calculateSelectionDimension()); + } else { + updateSelection(selectedComponents); } // There is selection, so we need to finalize the drag&drop // operation. @@ -744,7 +747,6 @@ public class Presenter implements IPlugInPort { messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, preDragProject, cloner .deepClone(currentProject), "Drag"); projectFileManager.notifyFileChange(); - fireSelectionSizeChanged(); } messageDispatcher.dispatchMessage(EventType.REPAINT); dragInProgress = false;