Fixes persistent crashes when quitting MuseScore
This commit is contained in:
parent
c471317b40
commit
440ad765fb
2 changed files with 13 additions and 12 deletions
|
@ -292,7 +292,7 @@ void DockBase::listenFloatingChanges()
|
|||
}
|
||||
|
||||
connect(m_dockWidget, &KDDockWidgets::DockWidgetQuick::parentChanged, [this]() {
|
||||
if (!m_dockWidget->parentItem()) {
|
||||
if (!m_dockWidget || !m_dockWidget->parentItem()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1279,18 +1279,19 @@ void NotationUiActions::init()
|
|||
}
|
||||
m_actionCheckedChanged.send(actions);
|
||||
|
||||
m_controller->currentNotationInteraction()->scoreConfigChanged().onReceive(this, [this](ScoreConfigType configType) {
|
||||
static const std::unordered_map<ScoreConfigType, std::string> configActions = {
|
||||
{ ScoreConfigType::ShowInvisibleElements, SHOW_INVISIBLE_CODE },
|
||||
{ ScoreConfigType::ShowUnprintableElements, SHOW_UNPRINTABLE_CODE },
|
||||
{ ScoreConfigType::ShowFrames, SHOW_FRAMES_CODE },
|
||||
{ ScoreConfigType::ShowPageMargins, SHOW_PAGEBORDERS_CODE },
|
||||
{ ScoreConfigType::MarkIrregularMeasures, SHOW_IRREGULAR_CODE }
|
||||
};
|
||||
|
||||
m_actionCheckedChanged.send({ configActions.at(configType) });
|
||||
});
|
||||
if (m_controller->currentNotationInteraction()) {
|
||||
m_controller->currentNotationInteraction()->scoreConfigChanged().onReceive(this, [this](ScoreConfigType configType) {
|
||||
static const std::unordered_map<ScoreConfigType, std::string> configActions = {
|
||||
{ ScoreConfigType::ShowInvisibleElements, SHOW_INVISIBLE_CODE },
|
||||
{ ScoreConfigType::ShowUnprintableElements, SHOW_UNPRINTABLE_CODE },
|
||||
{ ScoreConfigType::ShowFrames, SHOW_FRAMES_CODE },
|
||||
{ ScoreConfigType::ShowPageMargins, SHOW_PAGEBORDERS_CODE },
|
||||
{ ScoreConfigType::MarkIrregularMeasures, SHOW_IRREGULAR_CODE }
|
||||
};
|
||||
|
||||
m_actionCheckedChanged.send({ configActions.at(configType) });
|
||||
});
|
||||
}
|
||||
m_controller->currentNotationStyleChanged().onNotify(this, [this]() {
|
||||
m_actionCheckedChanged.send({ TOGGLE_CONCERT_PITCH_CODE });
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue