Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix delete confirmations in workspace dock #18979

Merged
merged 4 commits into from Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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