Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
2ba2eeaf
Commit
2ba2eeaf
authored
10 years ago
by
Savici, Andrei T.
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/bugfix/8513_fix_script_window_save_exception_new'
parents
b3c0ccab
df19e109
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/MantidPlot/src/ScriptFileInterpreter.cpp
+17
-7
17 additions, 7 deletions
Code/Mantid/MantidPlot/src/ScriptFileInterpreter.cpp
with
17 additions
and
7 deletions
Code/Mantid/MantidPlot/src/ScriptFileInterpreter.cpp
+
17
−
7
View file @
2ba2eeaf
...
@@ -50,16 +50,26 @@ void ScriptFileInterpreter::prepareToClose()
...
@@ -50,16 +50,26 @@ void ScriptFileInterpreter::prepareToClose()
QPushButton
*
saveAsButton
=
msgBox
.
addButton
(
"Save As..."
,
QMessageBox
::
AcceptRole
);
QPushButton
*
saveAsButton
=
msgBox
.
addButton
(
"Save As..."
,
QMessageBox
::
AcceptRole
);
msgBox
.
addButton
(
QMessageBox
::
Discard
);
msgBox
.
addButton
(
QMessageBox
::
Discard
);
int
ret
=
msgBox
.
exec
();
int
ret
=
msgBox
.
exec
();
if
(
msgBox
.
clickedButton
()
==
saveAsButton
)
{
try
m_editor
->
saveAs
();
}
else
if
(
ret
==
QMessageBox
::
Save
)
{
{
m_editor
->
saveToCurrentFile
();
if
(
msgBox
.
clickedButton
()
==
saveAsButton
)
{
m_editor
->
saveAs
();
}
else
if
(
ret
==
QMessageBox
::
Save
)
{
m_editor
->
saveToCurrentFile
();
}
else
{
m_editor
->
setModified
(
false
);
}
}
}
else
//Catch cancelling save dialogue
catch
(
ScriptEditor
::
SaveCancelledException
&
sce
)
{
{
UNUSED_ARG
(
sce
);
m_editor
->
setModified
(
false
);
m_editor
->
setModified
(
false
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment