diff main/MainWindow.cpp @ 1800:ec77ade1ab50 horizontal-scale

Merge from default branch
author Chris Cannam
date Wed, 02 May 2018 14:33:41 +0100
parents bea6e7bced25
children e5229958a10c
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed May 02 14:28:44 2018 +0100
+++ b/main/MainWindow.cpp	Wed May 02 14:33:41 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));