Skip to content

Commit 8b726bc

Browse files
committed
fix(DlgPrefController): remove deadlock when loading screen mapping
1 parent d7701c5 commit 8b726bc

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
@@ -239,16 +239,21 @@ DlgPrefController::DlgPrefController(
239239
connect(this,
240240
&DlgPrefController::applyMapping,
241241
m_pControllerManager.get(),
242-
&ControllerManager::slotApplyMapping,
243-
Qt::BlockingQueuedConnection);
244-
// Wait until the mapping has been cloned in the controller thread
245-
// and we can continue to edit our copy
242+
&ControllerManager::slotApplyMapping);
246243

247244
// Update GUI
248245
connect(m_pControllerManager.get(),
249246
&ControllerManager::mappingApplied,
250247
this,
251248
&DlgPrefController::enableWizardAndIOTabs);
249+
250+
connect(m_pControllerManager.get(),
251+
&ControllerManager::mappingApplied,
252+
this,
253+
[this](bool) {
254+
// shortcut for creating and assigning required I/O table models
255+
showMapping(m_pMapping);
256+
});
252257
#ifdef MIXXX_USE_QML
253258
if (CmdlineArgs::Instance()
254259
.getControllerPreviewScreens()) {
@@ -361,8 +366,6 @@ void DlgPrefController::showLearningWizard() {
361366
if (!m_pMapping) {
362367
m_pMapping = std::make_shared<LegacyMidiControllerMapping>();
363368
emit applyMapping(m_pController, m_pMapping, true);
364-
// shortcut for creating and assigning required I/O table models
365-
showMapping(m_pMapping);
366369
}
367370

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

0 commit comments

Comments
 (0)