summaryrefslogtreecommitdiff
path: root/Mozo/MainWindow.py
diff options
context:
space:
mode:
authorgm10 <[email protected]>2019-08-04 17:04:53 +0200
committerraveit65 <[email protected]>2019-09-12 17:51:00 +0200
commit22ea99427c41240f786b46aabd3d165e26f66a06 (patch)
tree8b84cbacdd3d47b21eaac512589b86ee9a8f2739 /Mozo/MainWindow.py
parentbf56157cb7f5b7cb851cc709889c27c4a168205b (diff)
downloadmozo-22ea99427c41240f786b46aabd3d165e26f66a06.tar.bz2
mozo-22ea99427c41240f786b46aabd3d165e26f66a06.tar.xz
Fix item drag & drop creating copies, fix undo, redo and a crash when refreshing
Diffstat (limited to 'Mozo/MainWindow.py')
-rw-r--r--Mozo/MainWindow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Mozo/MainWindow.py b/Mozo/MainWindow.py
index 6b92227..93a9e4c 100644
--- a/Mozo/MainWindow.py
+++ b/Mozo/MainWindow.py
@@ -98,7 +98,7 @@ class MainWindow:
update_items = False
update_type = None
item_id = None
- if iter:
+ if iter and items[iter][3].get_desktop_file_path():
update_items = True
if isinstance(items[iter][3], MateMenu.TreeDirectory):
item_id = os.path.split(items[iter][3].get_desktop_file_path())[1]
@@ -425,7 +425,7 @@ class MainWindow:
item = self.drag_data
new_parent = menus[path][2]
if isinstance(item, MateMenu.TreeEntry):
- self.editor.copyItem(item, new_parent)
+ self.editor.moveItem(item, new_parent)
elif isinstance(item, MateMenu.TreeDirectory):
if not self.editor.moveMenu(item, new_parent):
self.loadUpdates()
@@ -593,7 +593,7 @@ class MainWindow:
item = items[path][3]
before = items[(path.get_indices()[0] - 1,)][3]
if isinstance(item, MateMenu.TreeEntry):
- self.editor.moveItem(item.get_parent(), item, before=before)
+ self.editor.moveItem(item, item.get_parent(), before=before)
elif isinstance(item, MateMenu.TreeDirectory):
self.editor.moveMenu(item, item.get_parent(), before=before)
elif isinstance(item, MateMenu.TreeSeparator):
@@ -611,7 +611,7 @@ class MainWindow:
item = items[path][3]
after = items[path][3]
if isinstance(item, MateMenu.TreeEntry):
- self.editor.moveItem(item.get_parent(), item, after=after)
+ self.editor.moveItem(item, item.get_parent(), after=after)
elif isinstance(item, MateMenu.TreeDirectory):
self.editor.moveMenu(item, item.get_parent(), after=after)
elif isinstance(item, MateMenu.TreeSeparator):