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
b772d861
Commit
b772d861
authored
8 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Additional check for equality of SessionItem's data.
parent
f36718ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/coregui/Models/SessionItem.cpp
+5
-1
5 additions, 1 deletion
GUI/coregui/Models/SessionItem.cpp
GUI/main/main.cpp
+3
-0
3 additions, 0 deletions
GUI/main/main.cpp
with
8 additions
and
1 deletion
GUI/coregui/Models/SessionItem.cpp
+
5
−
1
View file @
b772d861
...
...
@@ -438,7 +438,6 @@ QVariant SessionItem::getItemValue(const QString &tag) const
void
SessionItem
::
setItemValue
(
const
QString
&
tag
,
const
QVariant
&
variant
)
{
// check if variant of previous property coincides with new one
if
(
!
isTag
(
tag
))
throw
GUIHelpers
::
Error
(
"Property not existing!"
);
...
...
@@ -615,6 +614,11 @@ bool SessionItem::setValue(QVariant value)
throw
GUIHelpers
::
Error
(
"ParameterizedItem::setRegisteredProperty() -> Error. Type of "
"previous and new variant does not coincide."
);
}
// TODO If QVariant contains ComboProperty, the comparison will be always true.
if
(
previous_variant
==
value
)
return
true
;
return
setData
(
Qt
::
DisplayRole
,
value
);
}
...
...
This diff is collapsed.
Click to expand it.
GUI/main/main.cpp
+
3
−
0
View file @
b772d861
...
...
@@ -39,6 +39,9 @@ int main(int argc, char *argv[])
QLocale
::
setDefault
(
QLocale
(
QLocale
::
English
,
QLocale
::
UnitedStates
));
qRegisterMetaType
<
QVector
<
double
>
>
(
"QVector<double>"
);
qRegisterMetaType
<
FitProgressInfo
>
(
"FitProgressInfo"
);
// If uncomment line below, we will be able to compare QVariant containig ComboProperty
// but the program will be unstable.
// QMetaType::registerComparators<ComboProperty>();
QApplication
a
(
argc
,
argv
);
...
...
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