Commit 65d9e0e0 authored by Alexander Semke's avatar Alexander Semke

Update the spreadsheets on header settings changes directly without

restarting the application.
parent 0ffcaa2c
......@@ -123,6 +123,10 @@ bool Spreadsheet::printPreview() const {
return m_view->printPreview();
}
void Spreadsheet::updateHorizontalHeader() {
m_model->updateHorizontalHeader();
}
/*!
Returns the maximum number of rows in the spreadsheet.
*/
......
......@@ -54,6 +54,8 @@ public:
void setModel(SpreadsheetModel*);
SpreadsheetModel* model();
void updateHorizontalHeader();
int columnCount() const;
int columnCount(AbstractColumn::PlotDesignation) const;
Column* column(int index) const;
......
......@@ -66,6 +66,7 @@ public:
void activateFormulaMode(bool on);
bool formulaModeActive() const;
void updateHorizontalHeader();
void suppressSignals(bool);
private slots:
......@@ -83,7 +84,6 @@ private slots:
protected:
void updateVerticalHeader();
void updateHorizontalHeader();
private:
Spreadsheet* m_spreadsheet;
......
......@@ -2272,6 +2272,11 @@ void MainWin::handleSettingsChanges() {
}
}
//update spreadsheet header
auto spreadsheets = m_project->children<Spreadsheet>(AbstractAspect::ChildIndexFlag::Recursive);
for (auto* spreadsheet : spreadsheets)
spreadsheet->updateHorizontalHeader();
bool showWelcomeScreen = group.readEntry<bool>(QLatin1String("ShowWelcomeScreen"), true);
if(m_showWelcomeScreen != showWelcomeScreen)
m_showWelcomeScreen = showWelcomeScreen;
......
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