Skip to content

Commit

Permalink
Merge pull request #18979 from mantidproject/18978_fix_delete_confirm…
Browse files Browse the repository at this point in the history
…ations

Fix delete confirmations in workspace dock
  • Loading branch information
peterfpeterson committed Feb 24, 2017
2 parents a75a4b3 + 3689784 commit 0cc7201
Show file tree
Hide file tree
Showing 6 changed files with 16 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 @@ -2702,6 +2706,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
1 change: 1 addition & 0 deletions docs/source/release/v3.10.0/ui.rst
Expand Up @@ -21,6 +21,7 @@ User Interface
Instrument View
###############
- Fixed a bug preventing the some of the banks from being visible when using a U correction.
- Fixed a bug where the user would not be prompted before deleting workspaces even if confirmations were turned on.

Plotting Improvements
#####################
Expand Down

0 comments on commit 0cc7201

Please sign in to comment.