Skip to content

Commit

Permalink
ListView, GridView: slightly different behavior for drag and drop whe…
Browse files Browse the repository at this point in the history
…n allowMultipleSelection is set vs when it isn't
  • Loading branch information
joshtynjala committed Apr 11, 2024
1 parent db592c4 commit dbe2cca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/feathers/controls/GridView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,7 @@ class GridView extends BaseScrollContainer implements IIndexSelector implements
stage.removeEventListener(MouseEvent.MOUSE_UP, gridView_stage_pressAndMove_mouseUpHandler);

var items:Array<Dynamic> = [];
var draggedIndices = this._selectedIndices.copy();
var draggedIndices = this._allowMultipleSelection ? this._selectedIndices.copy() : [];
if (draggedIndices.indexOf(this._dragRowIndex) == -1) {
draggedIndices.push(this._dragRowIndex);
}
Expand Down
2 changes: 1 addition & 1 deletion src/feathers/controls/ListView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ class ListView extends BaseScrollContainer implements IIndexSelector implements
stage.removeEventListener(MouseEvent.MOUSE_UP, listView_stage_pressAndMove_mouseUpHandler);

var items:Array<Dynamic> = [];
var draggedIndices = this._selectedIndices.copy();
var draggedIndices = this._allowMultipleSelection ? this._selectedIndices.copy() : [];
if (draggedIndices.indexOf(this._dragIndex) == -1) {
draggedIndices.push(this._dragIndex);
}
Expand Down

0 comments on commit dbe2cca

Please sign in to comment.