Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
4013fb34
Commit
4013fb34
authored
1 year ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
early return
parent
83a4fb6e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/View/PlotUtil/SavePlotAssistant.cpp
+10
-11
10 additions, 11 deletions
GUI/View/PlotUtil/SavePlotAssistant.cpp
with
10 additions
and
11 deletions
GUI/View/PlotUtil/SavePlotAssistant.cpp
+
10
−
11
View file @
4013fb34
...
...
@@ -139,18 +139,17 @@ void GUI::Plot::savePlot(const QString& dirname, QCustomPlot* plot, const Datafi
nullptr
,
"Save Plot"
,
defaultName
,
getFilterString
(),
&
selectedFilter
,
appSettings
->
useNativeFileDialog
()
?
QFileDialog
::
Options
()
:
QFileDialog
::
DontUseNativeDialog
);
if
(
fileName
.
isEmpty
())
return
;
QString
nameToSave
=
composeFileName
(
fileName
,
selectedFilter
);
if
(
!
nameToSave
.
isEmpty
())
{
try
{
saveToFile
(
nameToSave
,
plot
,
output_data
);
}
catch
(
const
std
::
exception
&
ex
)
{
QString
message
=
"Attempt to save file with the name '"
;
message
.
append
(
nameToSave
);
message
.
append
(
"' has failed with following error message
\n\n
"
);
message
.
append
(
QString
::
fromStdString
(
ex
.
what
()));
QMessageBox
::
warning
(
nullptr
,
"Houston, we have a problem."
,
message
);
}
try
{
saveToFile
(
nameToSave
,
plot
,
output_data
);
}
catch
(
const
std
::
exception
&
ex
)
{
QString
message
=
"Attempt to save file with the name '"
;
message
.
append
(
nameToSave
);
message
.
append
(
"' has failed with following error message
\n\n
"
);
message
.
append
(
QString
::
fromStdString
(
ex
.
what
()));
QMessageBox
::
warning
(
nullptr
,
"Houston, we have a problem."
,
message
);
}
}
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