Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dtk-visualization
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dtk
dtk-visualization
Commits
6571e2fa
Commit
6571e2fa
authored
Jan 21, 2020
by
NICLAUSSE Nicolas
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/bug_moving_scalarbar' into 'develop'
Feature/bug moving scalarbar See merge request
!44
parents
104424c2
76786bd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/dtkVisualization/dtkVisualizationCanvas.cpp
src/dtkVisualization/dtkVisualizationCanvas.cpp
+5
-2
No files found.
src/dtkVisualization/dtkVisualizationCanvas.cpp
View file @
6571e2fa
...
...
@@ -214,11 +214,14 @@ vtkRenderWindowInteractor *dtkVisualizationCanvas::interactor(void)
void
dtkVisualizationCanvas
::
addScalarBar
(
vtkScalarBarActor
*
scalar_bar
)
{
if
(
this
->
renderer
()
&&
this
->
renderer
()
->
GetViewProps
()
->
IsItemPresent
(
scalar_bar
))
{
return
;
}
++
d
->
nb_scalar_bars
;
std
::
size_t
orientation
=
d
->
nb_scalar_bars
%
2
;
// 0: horizontal, 1: vertical
std
::
size_t
side
=
(
d
->
nb_scalar_bars
%
4
)
>=
2
;
// 0: right, 1: left
std
::
size_t
loop
=
d
->
nb_scalar_bars
/
4
;
std
::
size_t
side
=
(
d
->
nb_scalar_bars
%
4
)
<
2
;
// 0: right, 1: left
scalar_bar
->
SetOrientation
(
orientation
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment