Skip to content

Commit

Permalink
Fix drag and drop item duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAlien committed Sep 16, 2020
1 parent bac2e61 commit d3d69be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Widgets/IconListBox.vala
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public class Workspaces.Widgets.IconListBox : Gtk.ListBox {
}

private string[] search_icons (string query) {
debug (@"searching $query");
string[] matched = { };
for (int i = 0; i < icons.size; i++) {
string icon_name = icons[i];
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/WorkspaceRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ public class Workspaces.Widgets.WorkspaceRow : Gtk.ListBoxRow {
var row = ((Gtk.Widget[])selection_data.get_data ())[0];
source = (Workspaces.Widgets.ItemRow)row;

source.get_parent ().remove (source);
listbox.remove (source);
Application.instance.workspaces_controller.remove_item (source.item);

listbox.insert (source, 0);
Application.instance.workspaces_controller.add_item (source.item, workspace);
Application.instance.workspaces_controller.insert_item (source.item, workspace, 0);

listbox.show_all ();
listbox_revealer.reveal_child = true;
Expand Down

0 comments on commit d3d69be

Please sign in to comment.