diff options
author | ronso0 <ronso0@mixxx.org> | 2021-06-13 16:37:55 +0200 |
---|---|---|
committer | ronso0 <ronso0@mixxx.org> | 2021-06-13 17:29:41 +0200 |
commit | 4b6a9aaca99e28bb48449a5a4eb6d5ec0eb8a0fa (patch) | |
tree | a22ffac218d1795be260ac214bf78d4f316f8638 /src/preferences | |
parent | f63a674d85f93076d7b7ca03a98edfd289451835 (diff) |
DlgPrefWaveforms: adjust ResetToDefault to new combobox content
Diffstat (limited to 'src/preferences')
-rw-r--r-- | src/preferences/dialog/dlgprefwaveform.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/preferences/dialog/dlgprefwaveform.cpp b/src/preferences/dialog/dlgprefwaveform.cpp index 7bb1cdde9e..8bf3f5682a 100644 --- a/src/preferences/dialog/dlgprefwaveform.cpp +++ b/src/preferences/dialog/dlgprefwaveform.cpp @@ -195,10 +195,10 @@ void DlgPrefWaveform::slotApply() { void DlgPrefWaveform::slotResetToDefaults() { WaveformWidgetFactory* factory = WaveformWidgetFactory::instance(); - // Get the default we ought to use based on whether the user has OpenGL or - // not. - WaveformWidgetType::Type defaultType = factory->autoChooseWidgetType(); - int defaultIndex = waveformTypeComboBox->findData(defaultType); + // Get the default we ought to use based on whether the user has OpenGL or not. + // Select the combobox index that holds the default handle's index in data column. + int defaultIndex = waveformTypeComboBox->findData( + factory->findHandleIndexFromType(factory->autoChooseWidgetType())); if (defaultIndex != -1 && waveformTypeComboBox->currentIndex() != defaultIndex) { waveformTypeComboBox->setCurrentIndex(defaultIndex); } |