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
70f09f2a
Commit
70f09f2a
authored
1 year ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Plain Diff
[m.i810c] Fix expanded/collapsed state of layer in sample editor(
#810
) (Closes
#810
)
Merging branch 'm.i810c' into 'main'. See merge request
!2087
parents
b543607e
108c1a9b
No related branches found
No related tags found
1 merge request
!2087
Fix expanded/collapsed state of layer in sample editor(#810)
Pipeline
#118680
passed
1 year ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/SampleDesigner/SampleEditorController.cpp
+1
-1
1 addition, 1 deletion
GUI/View/SampleDesigner/SampleEditorController.cpp
GUI/View/Widget/GroupBoxes.cpp
+2
-1
2 additions, 1 deletion
GUI/View/Widget/GroupBoxes.cpp
with
3 additions
and
2 deletions
GUI/View/SampleDesigner/SampleEditorController.cpp
+
1
−
1
View file @
70f09f2a
...
...
@@ -67,7 +67,7 @@ void SampleEditorController::addLayerItem(LayerItem* before)
LayerItem
*
layer
=
m_sampleItem
->
createLayerItemAt
(
i
);
layer
->
setMaterial
(
materialModel
()
->
defaultMaterialItem
());
layer
->
setColor
(
color
);
layer
->
expandLayer
=
true
;
// manually added layer => expanded
onLayerAdded
(
layer
);
}
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Widget/GroupBoxes.cpp
+
2
−
1
View file @
70f09f2a
...
...
@@ -72,7 +72,7 @@ CollapsibleGroupBox::CollapsibleGroupBox(const QString& title, QWidget* parent,
m_toggleButton
->
setCheckable
(
true
);
m_toggleButton
->
setText
(
title
);
m_toggleButton
->
setArrowType
(
Qt
::
ArrowType
::
DownArrow
);
m_toggleButton
->
setChecked
(
true
);
m_toggleButton
->
setChecked
(
expanded
);
m_toggleButton
->
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
MinimumExpanding
);
//... Body
...
...
@@ -81,6 +81,7 @@ CollapsibleGroupBox::CollapsibleGroupBox(const QString& title, QWidget* parent,
layout
->
addWidget
(
m_body
);
m_body
->
setObjectName
(
"ContentArea"
);
// stylesheet -> transparent background
m_body
->
setVisible
(
expanded
);
m_toggleButton
->
setArrowType
(
expanded
?
Qt
::
ArrowType
::
DownArrow
:
Qt
::
ArrowType
::
RightArrow
);
connect
(
m_toggleButton
,
&
QAbstractButton
::
clicked
,
[
tb
=
m_toggleButton
,
bo
=
m_body
,
&
expanded
](
bool
checked
)
{
...
...
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