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
1aa3d0e0
Commit
1aa3d0e0
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
DataItem: rm containsNonXmlData()
parent
d0cf1dde
No related branches found
No related tags found
1 merge request
!1293
GUI: simplify save/load machinery
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Data/DataItem.cpp
+1
-6
1 addition, 6 deletions
GUI/Model/Data/DataItem.cpp
GUI/Model/Data/DataItem.h
+4
-4
4 additions, 4 deletions
GUI/Model/Data/DataItem.h
with
5 additions
and
10 deletions
GUI/Model/Data/DataItem.cpp
+
1
−
6
View file @
1aa3d0e0
...
...
@@ -93,11 +93,6 @@ QDateTime DataItem::lastModified() const
return
m_last_modified
;
}
bool
DataItem
::
containsNonXMLData
()
const
{
return
static_cast
<
bool
>
(
m_datafield
);
}
QString
DataItem
::
loadDatafield
(
MessageService
*
messageService
,
const
QString
&
projectDir
)
{
if
(
projectDir
.
isEmpty
())
...
...
@@ -123,7 +118,7 @@ void DataItem::saveDatafield(const QString& projectDir) const
{
const
auto
file
=
dataFullPath
(
projectDir
);
if
(
!
containsNonXMLData
()
)
if
(
!
m_datafield
)
return
;
if
(
QFile
::
exists
(
file
)
&&
!
wasModifiedSinceLastSave
())
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Data/DataItem.h
+
4
−
4
View file @
1aa3d0e0
...
...
@@ -51,16 +51,15 @@ public:
void
setRawDataVector
(
const
std
::
vector
<
double
>&
data
);
QString
fileName
()
const
;
void
setFileName
(
const
QString
&
filename
);
QString
dataFullPath
(
const
QString
&
projectDir
)
const
;
void
setFileName
(
const
QString
&
filename
);
QDateTime
lastModified
()
const
;
bool
containsNonXMLData
()
const
;
void
setLastModified
(
const
QDateTime
&
dtime
);
QString
loadDatafield
(
MessageService
*
messageService
,
const
QString
&
projectDir
);
void
saveDatafield
(
const
QString
&
projectDir
)
const
;
void
setLastModified
(
const
QDateTime
&
dtime
);
// Number of bins in data
int
xSize
()
const
;
int
ySize
()
const
;
...
...
@@ -142,6 +141,7 @@ protected:
mutable
std
::
mutex
m_update_data_mutex
;
QString
m_fileName
;
QString
m_fileDir
;
ComboProperty
m_axesUnits
;
std
::
unique_ptr
<
BasicAxisItem
>
m_xAxis
;
std
::
unique_ptr
<
AmplitudeAxisItem
>
m_yAxis
;
...
...
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