# HG changeset patch # User Chris Cannam # Date 1525267921 -3600 # Node ID bea6e7bced2538bb1660e4700260e7c92c1b0eb7 # Parent ea66d37669bf41bd3ba567999f113d4e91217034 Fix accidental removal of empty-pane/layer addition shortcuts diff -r ea66d37669bf -r bea6e7bced25 main/MainWindow.cpp --- 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 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));