Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 1799:bea6e7bced25
Fix accidental removal of empty-pane/layer addition shortcuts
author | Chris Cannam |
---|---|
date | Wed, 02 May 2018 14:32:01 +0100 |
parents | 2f828631c9be |
children | e5229958a10c |
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));