mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
don't allow selection rect when creating new
update selection when dropped
This commit is contained in:
+4
-2
@@ -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
|
// If there's no selection, the only thing to do is update the
|
||||||
// selection rectangle and refresh.
|
// selection rectangle and refresh.
|
||||||
Rectangle oldSelectionRect = selectionRect == null ? null
|
Rectangle oldSelectionRect = selectionRect == null ? null
|
||||||
@@ -736,6 +737,8 @@ public class Presenter implements IPlugInPort {
|
|||||||
// selectedComponents);
|
// selectedComponents);
|
||||||
// messageDispatcher.dispatchMessage(EventType.SELECTION_SIZE_CHANGED,
|
// messageDispatcher.dispatchMessage(EventType.SELECTION_SIZE_CHANGED,
|
||||||
// calculateSelectionDimension());
|
// calculateSelectionDimension());
|
||||||
|
} else {
|
||||||
|
updateSelection(selectedComponents);
|
||||||
}
|
}
|
||||||
// There is selection, so we need to finalize the drag&drop
|
// There is selection, so we need to finalize the drag&drop
|
||||||
// operation.
|
// operation.
|
||||||
@@ -744,7 +747,6 @@ public class Presenter implements IPlugInPort {
|
|||||||
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, preDragProject, cloner
|
messageDispatcher.dispatchMessage(EventType.PROJECT_MODIFIED, preDragProject, cloner
|
||||||
.deepClone(currentProject), "Drag");
|
.deepClone(currentProject), "Drag");
|
||||||
projectFileManager.notifyFileChange();
|
projectFileManager.notifyFileChange();
|
||||||
fireSelectionSizeChanged();
|
|
||||||
}
|
}
|
||||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||||
dragInProgress = false;
|
dragInProgress = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user