File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,15 @@ public void mouseExited(MouseEvent e) {
166166 @ Override
167167 public void mouseDragged (MouseEvent e ) {
168168
169- //do nothing if dragged empty
170- if (!canDrag ) return ;
171- // if it is the first time in our move, and only one selected before the
172- // start of dragging, i.e. two items selected after mouse press
173- if (!moved && !movingComponentOriginallySelected ) {
174- if (selectedComponents .size () == 2 ) {
175- //deselect the bottom component
169+ // do nothing if dragged empty
170+ // TODO GROUP SELECTION WHEN CANNOT DRAG
171+ if (!canDrag )
172+ return ;
173+ // if it is the first time in our move, and the moving component is not
174+ // originally selected, deselect all bottom components
175+ if (!moved && !movingComponentOriginallySelected ) {
176+ // deselect the bottom components, by removing all until
177+ while (selectedComponents .size () != 1 ) {
176178 deselectComponent (selectedComponents .get (0 ));
177179 }
178180 }
@@ -203,7 +205,7 @@ public void mouseDragged(MouseEvent e) {
203205
204206 @ Override
205207 public void mouseMoved (MouseEvent e ) {
206-
208+
207209 // shows a left arrow if cursor hits something
208210 PaintComponent comp = panel .componentUnderPoint (e .getX (), e .getY ());
209211 if (comp != null ) {
You can’t perform that action at this time.
0 commit comments