changeset 1799:bea6e7bced25

Fix accidental removal of empty-pane/layer addition shortcuts
author Chris Cannam
date Wed, 02 May 2018 14:32:01 +0100
parents ea66d37669bf
children ec77ade1ab50 75be1cb2f3c1
files main/MainWindow.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed May 02 14:31:42 2018 +0100
+++ b/main/MainWindow.cpp	Wed May 02 14:32:01 2018 +0100
@@ -1611,6 +1611,7 @@
     set<LayerFactory::LayerType> seen;
     
     for (auto &a : m_paneActions) {
+        if (!a.second.sourceModel) continue; // empty pane/layer shortcut
         auto type = a.second.layer;
         if (a.second.sourceModel == model && seen.find(type) == seen.end()) {
             a.first->setShortcut(shortcutFor(type, true));
@@ -1623,6 +1624,7 @@
     seen.clear();
     
     for (auto &a : m_layerActions) {
+        if (!a.second.sourceModel) continue; // empty pane/layer shortcut
         auto type = a.second.layer;
         if (a.second.sourceModel == model && seen.find(type) == seen.end()) {
             a.first->setShortcut(shortcutFor(type, false));