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
e2b5ccf7
Commit
e2b5ccf7
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
update realspace view when current sample changes or was deleted
parent
ae629a27
No related branches found
No related tags found
1 merge request
!447
Real space for layer editor
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/SampleDesigner/SampleView.cpp
+10
-0
10 additions, 0 deletions
GUI/View/SampleDesigner/SampleView.cpp
GUI/View/SampleDesigner/SampleView.h
+5
-0
5 additions, 0 deletions
GUI/View/SampleDesigner/SampleView.h
with
15 additions
and
0 deletions
GUI/View/SampleDesigner/SampleView.cpp
+
10
−
0
View file @
e2b5ccf7
...
@@ -146,6 +146,9 @@ void SampleView::initLayerOrientedEditor()
...
@@ -146,6 +146,9 @@ void SampleView::initLayerOrientedEditor()
connect
(
scriptPanel
,
&
ScriptPanel
::
widgetHeightRequest
,
m_docks
,
connect
(
scriptPanel
,
&
ScriptPanel
::
widgetHeightRequest
,
m_docks
,
&
DocksController
::
setDockHeightForWidget
);
&
DocksController
::
setDockHeightForWidget
);
connect
(
sampleSelectionView
,
&
SampleListView
::
currentSampleChanged
,
this
,
&
SampleView
::
onCurrentSampleChanged
);
connect
(
sampleSelectionView
,
&
SampleListView
::
currentSampleChanged
,
editor
,
connect
(
sampleSelectionView
,
&
SampleListView
::
currentSampleChanged
,
editor
,
&
LayerOrientedSampleEditor
::
setCurrentSample
);
&
LayerOrientedSampleEditor
::
setCurrentSample
);
...
@@ -203,6 +206,13 @@ void SampleView::onSampleTreeViewSelectionChanged(const QItemSelection& selected
...
@@ -203,6 +206,13 @@ void SampleView::onSampleTreeViewSelectionChanged(const QItemSelection& selected
m_realSpacePanel
->
canvas
()
->
setCurrentItem
(
item
);
m_realSpacePanel
->
canvas
()
->
setCurrentItem
(
item
);
}
}
void
SampleView
::
onCurrentSampleChanged
(
MultiLayerItem
*
current
)
{
if
(
m_layerOrientedSampleEditor
)
m_layerOrientedSampleEditor
->
setCurrentSample
(
current
);
m_realSpacePanel
->
canvas
()
->
setCurrentItem
(
current
);
}
void
SampleView
::
onRequestViewInRealSpace
(
SessionItem
*
itemToView
)
void
SampleView
::
onRequestViewInRealSpace
(
SessionItem
*
itemToView
)
{
{
if
(
!
itemToView
)
if
(
!
itemToView
)
...
...
This diff is collapsed.
Click to expand it.
GUI/View/SampleDesigner/SampleView.h
+
5
−
0
View file @
e2b5ccf7
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
#include
<QMainWindow>
#include
<QMainWindow>
#include
<QPointer>
class
DocksController
;
class
DocksController
;
class
ProjectDocument
;
class
ProjectDocument
;
...
@@ -23,6 +24,8 @@ class SampleToolBar;
...
@@ -23,6 +24,8 @@ class SampleToolBar;
class
RealSpacePanel
;
class
RealSpacePanel
;
class
QItemSelection
;
class
QItemSelection
;
class
SessionItem
;
class
SessionItem
;
class
LayerOrientedSampleEditor
;
class
MultiLayerItem
;
class
SampleView
:
public
QMainWindow
{
class
SampleView
:
public
QMainWindow
{
Q_OBJECT
Q_OBJECT
...
@@ -41,6 +44,7 @@ private:
...
@@ -41,6 +44,7 @@ private:
void
deleteEditor
();
void
deleteEditor
();
void
updateFunctionalities
();
void
updateFunctionalities
();
void
onSampleTreeViewSelectionChanged
(
const
QItemSelection
&
selected
,
const
QItemSelection
&
);
void
onSampleTreeViewSelectionChanged
(
const
QItemSelection
&
selected
,
const
QItemSelection
&
);
void
onCurrentSampleChanged
(
MultiLayerItem
*
current
);
//! Show the item in the real space view
//! Show the item in the real space view
//!
//!
...
@@ -52,6 +56,7 @@ private:
...
@@ -52,6 +56,7 @@ private:
SampleToolBar
*
m_toolBar
=
nullptr
;
SampleToolBar
*
m_toolBar
=
nullptr
;
RealSpacePanel
*
m_realSpacePanel
=
nullptr
;
RealSpacePanel
*
m_realSpacePanel
=
nullptr
;
bool
m_useLayerOrientedEditor
=
false
;
bool
m_useLayerOrientedEditor
=
false
;
QPointer
<
LayerOrientedSampleEditor
>
m_layerOrientedSampleEditor
;
};
};
#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
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