Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/preferences/dialog/dlgprefcontrols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxMainWindow * mixxx,
this, SLOT(slotSetRateRange(int)));

// Set default range as stored in config file
if (m_pConfig->getValueString(ConfigKey("[Controls]", "RateRangePercent")).length() == 0) {
if (!m_pConfig->exists(ConfigKey("[Controls]","RateRangePercent")) ||
m_pConfig->getValueString(ConfigKey("[Controls]", "RateRangePercent")).length() == 0) {
// Fall back to old [Controls]RateRange
if (m_pConfig->getValueString(ConfigKey("[Controls]", "RateRange")).length() == 0) {
m_pConfig->set(ConfigKey("[Controls]", "RateRangePercent"), ConfigValue(8));
if (!m_pConfig->exists(ConfigKey("[Controls]","RateRange")) ||
m_pConfig->getValueString(ConfigKey("[Controls]", "RateRange")).length() == 0) {
int rateRangePercent = 8;
m_pConfig->set(ConfigKey("[Controls]", "RateRangePercent"), ConfigValue(rateRangePercent));
slotSetRateRangePercent(rateRangePercent);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't slotSetRateRangePercent called if you set the combobox to the new value?
Maybe you need to call it manually

That's what's happening here, isn't it?
I tested it, it works, so I assumed those lines are processed on startup.
Or do I get it wrong?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested it. Is this

I don't know how to fix the other issue I noticed that defaults would be restored visually but not actually applied.

issue solved than?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope!
As I reported, it affects other settings as well, i.e position display. Don't know how to approach that.

} else {
int oldIdx = m_pConfig->getValueString(ConfigKey("[Controls]", "RateRange")).toInt();
double oldRange = static_cast<double>(oldIdx-1) / 10.0;
Expand Down