Skip to content

Commit eb2a571

Browse files
committed
Ignore drag and drop action within the application
1 parent f807e59 commit eb2a571

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gourmand/importers/clipboard_importer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def import_from_drag_and_drop(treeview: Gtk.Widget,
5858
This function is expected to be connected to a signal.
5959
If so, the signal will be done being handled here.
6060
"""
61-
content = data.get_text().strip()
62-
handle_import(content)
61+
dnd_within_app = (drag_context.get_source_window().get_parent()
62+
== drag_context.get_dest_window().get_parent())
63+
if not dnd_within_app:
64+
content = data.get_text().strip()
65+
handle_import(content)
6366
return True # Done handling signal

0 commit comments

Comments
 (0)