Skip to content

Commit

Permalink
Cherry-pick pull request #18979
Browse files Browse the repository at this point in the history
Refs #18978 Update dock when config changes

(cherry picked from commit b54bdfb)

Refs #18978 Set confirmations on startup

(cherry picked from commit eca83cf)

Refs #18978 Emit modified signal when settings are read.

(cherry picked from commit f694b70)

Add patch release note
  • Loading branch information
martyngigg committed Feb 24, 2017
1 parent 03062ed commit ab9feec
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -5338,6 +5338,8 @@ void ApplicationWindow::readSettings() {
settings.endGroup();
settings.endGroup();
// END Mantid Muon interface one time only change

emit configModified();
}

void ApplicationWindow::saveSettings() {
Expand Down
1 change: 1 addition & 0 deletions MantidPlot/src/ApplicationWindow.h
Expand Up @@ -1123,6 +1123,7 @@ public slots:
signals:
void modified();
void shutting_down();
void configModified();

protected:
bool event(QEvent *e) override;
Expand Down
1 change: 1 addition & 0 deletions MantidPlot/src/ConfigDialog.cpp
Expand Up @@ -2690,6 +2690,7 @@ void ConfigDialog::apply() {

// MD Plotting
updateMdPlottingSettings();
emit app->configModified();
}

/**
Expand Down
9 changes: 9 additions & 0 deletions MantidPlot/src/Mantid/MantidUI.cpp
Expand Up @@ -216,6 +216,8 @@ MantidUI::MantidUI(ApplicationWindow *aw)

m_exploreMantid = boost::make_shared<QWorkspaceDockView>(this, aw);
m_exploreMantid->init();
m_exploreMantid->enableDeletePrompt(
appWindow()->isDeleteWorkspacePromptEnabled());
m_exploreAlgorithms = new AlgorithmDockWidget(this, aw);

actionCopyRowToTable = new QAction(this);
Expand Down Expand Up @@ -292,6 +294,8 @@ MantidUI::MantidUI(ApplicationWindow *aw)
connect(menuMantidMatrix, SIGNAL(aboutToShow()), this,
SLOT(menuMantidMatrixAboutToShow()));

connect(m_appWindow, SIGNAL(configModified(void)), this,
SLOT(configModified(void)));
init();
}

Expand Down Expand Up @@ -2695,6 +2699,11 @@ void MantidUI::formatLogName(QString &label, const QString &wsName) {
}
}

void MantidUI::configModified() {
m_exploreMantid->enableDeletePrompt(
appWindow()->isDeleteWorkspacePromptEnabled());
}

std::string MantidUI::extractLogTime(Mantid::Kernel::DateAndTime value,
bool useAbsoluteDate,
Mantid::Kernel::DateAndTime start) {
Expand Down
2 changes: 2 additions & 0 deletions MantidPlot/src/Mantid/MantidUI.h
Expand Up @@ -560,6 +560,8 @@ public slots:
#endif

private slots:
// respond to the global Mantid properties being modifed
void configModified();

// slot for file open dialogs created from the main app menu, or the
// workspaces dock window
Expand Down
3 changes: 3 additions & 0 deletions docs/source/release/v3.9.1/index.rst
Expand Up @@ -40,6 +40,7 @@ Changes in this version
* `18955 <https://www.github.com/mantidproject/mantid/pull/18955>`_ Fix crash in MonitorDlg
* `18959 <https://www.github.com/mantidproject/mantid/pull/18959>`_ Blank instrument view with U correction
* `18972 <https://www.github.com/mantidproject/mantid/pull/18972>`_ Fix reading dead time data in Muon interface
* `18979 <https://www.github.com/mantidproject/mantid/pull/18979>`_ Fix delete confirmations in workspace dock

Summary of impact
-----------------
Expand Down Expand Up @@ -80,6 +81,8 @@ Summary of impact
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+
| 18972 | Loads data with/without dead-time correction as per user request | Clear data cache after option is updated | **low** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+
| 18979 | Brings back delete confirmation dialog on removing workspace | Propagate setting to relevant objects | **medium** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+

.. _download page: http://download.mantidproject.org

Expand Down

0 comments on commit ab9feec

Please sign in to comment.