Skip to content

Commit 78996cb

Browse files
committed
fix(DlgPrefController): remove deadlock when loading screen mapping
1 parent 0fa937a commit 78996cb

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/controllers/dlgprefcontroller.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,21 @@ DlgPrefController::DlgPrefController(
236236
connect(this,
237237
&DlgPrefController::applyMapping,
238238
m_pControllerManager.get(),
239-
&ControllerManager::slotApplyMapping,
240-
Qt::BlockingQueuedConnection);
241-
// Wait until the mapping has been cloned in the controller thread
242-
// and we can continue to edit our copy
239+
&ControllerManager::slotApplyMapping);
243240

244241
// Update GUI
245242
connect(m_pControllerManager.get(),
246243
&ControllerManager::mappingApplied,
247244
this,
248245
&DlgPrefController::enableWizardAndIOTabs);
246+
247+
connect(m_pControllerManager.get(),
248+
&ControllerManager::mappingApplied,
249+
this,
250+
[this](bool) {
251+
// shortcut for creating and assigning required I/O table models
252+
showMapping(m_pMapping);
253+
});
249254
#ifdef MIXXX_USE_QML
250255
if (CmdlineArgs::Instance()
251256
.getControllerPreviewScreens()) {
@@ -358,8 +363,6 @@ void DlgPrefController::showLearningWizard() {
358363
if (!m_pMapping) {
359364
m_pMapping = std::make_shared<LegacyMidiControllerMapping>();
360365
emit applyMapping(m_pController, m_pMapping, true);
361-
// shortcut for creating and assigning required I/O table models
362-
showMapping(m_pMapping);
363366
}
364367

365368
// Note that DlgControllerLearning is set to delete itself on close using

0 commit comments

Comments
 (0)