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
4f21560e
Commit
4f21560e
authored
6 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Check in 3D view against SampleModel which is going to die
parent
1b8a4553
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/coregui/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
+8
-0
8 additions, 0 deletions
GUI/coregui/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
with
8 additions
and
0 deletions
GUI/coregui/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
+
8
−
0
View file @
4f21560e
...
@@ -128,6 +128,8 @@ void RealSpaceCanvas::onChangeLayerSizeAction(double layerSizeChangeScale)
...
@@ -128,6 +128,8 @@ void RealSpaceCanvas::onChangeLayerSizeAction(double layerSizeChangeScale)
void
RealSpaceCanvas
::
onDataChanged
(
const
QModelIndex
&
index
)
void
RealSpaceCanvas
::
onDataChanged
(
const
QModelIndex
&
index
)
{
{
auto
item
=
m_sampleModel
->
itemForIndex
(
index
);
auto
item
=
m_sampleModel
->
itemForIndex
(
index
);
if
(
!
item
)
return
;
if
(
!
(
item
->
modelType
()
==
Constants
::
PropertyType
if
(
!
(
item
->
modelType
()
==
Constants
::
PropertyType
&&
(
item
->
displayName
()
==
SessionGraphicsItem
::
P_XPOS
&&
(
item
->
displayName
()
==
SessionGraphicsItem
::
P_XPOS
...
@@ -137,6 +139,9 @@ void RealSpaceCanvas::onDataChanged(const QModelIndex& index)
...
@@ -137,6 +139,9 @@ void RealSpaceCanvas::onDataChanged(const QModelIndex& index)
void
RealSpaceCanvas
::
updateScene
()
void
RealSpaceCanvas
::
updateScene
()
{
{
if
(
!
m_currentSelection
.
isValid
())
return
;
QApplication
::
setOverrideCursor
(
Qt
::
WaitCursor
);
QApplication
::
setOverrideCursor
(
Qt
::
WaitCursor
);
m_realSpaceModel
.
reset
(
new
RealSpaceModel
);
m_realSpaceModel
.
reset
(
new
RealSpaceModel
);
...
@@ -215,6 +220,9 @@ void RealSpaceCanvas::setConnected(SampleModel* model, bool makeConnected)
...
@@ -215,6 +220,9 @@ void RealSpaceCanvas::setConnected(SampleModel* model, bool makeConnected)
Qt
::
UniqueConnection
);
Qt
::
UniqueConnection
);
connect
(
model
,
&
SampleModel
::
modelReset
,
this
,
&
RealSpaceCanvas
::
resetScene
,
connect
(
model
,
&
SampleModel
::
modelReset
,
this
,
&
RealSpaceCanvas
::
resetScene
,
Qt
::
UniqueConnection
);
Qt
::
UniqueConnection
);
connect
(
model
,
&
SampleModel
::
modelAboutToBeReset
,
this
,
[
&
](){
m_currentSelection
=
QModelIndex
();},
Qt
::
UniqueConnection
);
}
else
{
}
else
{
disconnect
(
model
,
&
SampleModel
::
rowsInserted
,
this
,
&
RealSpaceCanvas
::
updateScene
);
disconnect
(
model
,
&
SampleModel
::
rowsInserted
,
this
,
&
RealSpaceCanvas
::
updateScene
);
disconnect
(
model
,
&
SampleModel
::
rowsRemoved
,
this
,
&
RealSpaceCanvas
::
updateScene
);
disconnect
(
model
,
&
SampleModel
::
rowsRemoved
,
this
,
&
RealSpaceCanvas
::
updateScene
);
...
...
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