Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.

Commit 0db1cf2

Browse files
committed
Disable page drag'n'drop when editing page
Signed-off-by: Jerome Flesch <[email protected]>
1 parent 9b6caa6 commit 0db1cf2

File tree

1 file changed

+5
-1
lines changed
  • src/paperwork/frontend/mainwindow

1 file changed

+5
-1
lines changed

src/paperwork/frontend/mainwindow/pages.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,8 +1568,12 @@ def redraw(self, extra_border=0):
15681568
self.canvas.redraw((position, size))
15691569

15701570
def set_drag_enabled(self, drag):
1571-
if not self.page.doc.can_edit:
1571+
if self.editor_state != "before":
1572+
# page editor is active ; can't drag'n'drop
15721573
drag = False
1574+
elif not self.page.doc.can_edit:
1575+
drag = False
1576+
15731577
self.drag_enabled = drag
15741578
if not self.canvas:
15751579
return

0 commit comments

Comments
 (0)