Commit 1962d672 authored by Stefan Gerlach's avatar Stefan Gerlach

[settings] don't crash changing settings without a project

parent 35061007
......@@ -228,7 +228,7 @@ bool SpreadsheetModel::setData(const QModelIndex& index, const QVariant& value,
QLocale locale;
double new_value = locale.toDouble(value.toString(), &ok);
if (ok) {
if (column->valueAt(row) == new_value )
if (column->valueAt(row) == new_value)
return false;
} else {
//an empty (non-numeric value) was provided
......
......@@ -2258,6 +2258,8 @@ void MainWin::handleSettingsChanges() {
}
//update the locale
if (!stackedWidget)
return;
auto* widget = stackedWidget->currentWidget();
BaseDock* dock = dynamic_cast<BaseDock*>(widget);
qDebug() << "dock " << dock;
......
......@@ -101,6 +101,7 @@ QLocale::Language SettingsGeneralPage::decimalSeparatorLocale() const {
}
void SettingsGeneralPage::applySettings() {
DEBUG("SettingsGeneralPage::applySettings()")
if (!m_changed)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment