Skip to content

Commit

Permalink
WaveformWidgetFactory: store type in member when writing to config
Browse files Browse the repository at this point in the history
This is necessary to recall the stored type when repopulating the widgets after
(re)loading a skin, for example when selecting an overview type in the preferences.
  • Loading branch information
ronso0 committed Oct 27, 2023
1 parent ad4e4cf commit 271ca56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/waveform/waveformwidgetfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ bool WaveformWidgetFactory::setWidgetType(
// type is acceptable
*pCurrentType = type;
if (m_config) {
m_configType = type;
m_config->setValue(
ConfigKey("[Waveform]", "WaveformType"),
static_cast<int>(*pCurrentType));
Expand All @@ -559,6 +560,7 @@ bool WaveformWidgetFactory::setWidgetType(
// fallback
*pCurrentType = WaveformWidgetType::EmptyWaveform;
if (m_config) {
m_configType = *pCurrentType;
m_config->setValue(
ConfigKey("[Waveform]", "WaveformType"),
static_cast<int>(*pCurrentType));
Expand Down

0 comments on commit 271ca56

Please sign in to comment.