Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michael Migliore
VTK
Commits
5640829a
Commit
5640829a
authored
Aug 19, 2010
by
Julien Finet
Committed by
Marcus D. Hanwell
Aug 22, 2010
Browse files
ENH: Factorize the code to set a plot to a corner.
vtkChartXY::AddPlot now calls vtkChartXY::SetPlotCorner
parent
a3de986c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Charts/vtkChartXY.cxx
View file @
5640829a
...
...
@@ -593,10 +593,7 @@ void vtkChartXY::SetPlotCorner(vtkPlot *plot, int corner)
<<
corner
);
return
;
}
if
(
!
this
->
RemovePlotFromCorners
(
plot
))
{
vtkWarningMacro
(
"Error removing plot from corners."
);
}
this
->
RemovePlotFromCorners
(
plot
);
// Grow the plot corners if necessary
if
(
int
(
this
->
ChartPrivate
->
PlotCorners
.
size
())
<=
corner
)
{
...
...
@@ -831,12 +828,9 @@ vtkIdType vtkChartXY::AddPlot(vtkPlot * plot)
return
-
1
;
}
plot
->
Register
(
this
);
// Add the plot to the default corner
plot
->
SetXAxis
(
this
->
ChartPrivate
->
axes
[
vtkAxis
::
BOTTOM
]);
plot
->
SetYAxis
(
this
->
ChartPrivate
->
axes
[
vtkAxis
::
LEFT
]);
this
->
ChartPrivate
->
plots
.
push_back
(
plot
);
vtkIdType
plotIndex
=
this
->
ChartPrivate
->
plots
.
size
()
-
1
;
this
->
ChartPrivate
->
PlotCorners
[
0
]
->
AddItem
(
plot
);
this
->
SetPlotCorner
(
plot
,
0
);
// Ensure that the bounds are recalculated
this
->
PlotTransformValid
=
false
;
// Mark the scene as dirty
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment