Small, but important bugfix: sometimes, the layout view got stuck in 'disable edits' mode which could only be left by closing the view.

This commit is contained in:
Matthias Koefferlein 2021-03-16 23:43:04 +01:00
parent 9fbc39a827
commit 536681f5e1
1 changed files with 3 additions and 1 deletions

View File

@ -266,7 +266,7 @@ LayoutView::LayoutView (db::Manager *manager, bool editable, lay::Plugin *plugin
// ensures the deferred method scheduler is present
tl::DeferredMethodScheduler::instance ();
setObjectName (QString::fromUtf8 (name));
setObjectName (QString::fromUtf8(name));
init (manager, parent);
}
@ -3972,6 +3972,8 @@ LayoutView::cancel ()
{
// cancel all drags and pending edit operations such as move operations.
cancel_edits ();
// re-enable edit mode
enable_edits (true);
// and clear the selection
clear_selection ();
}