|
@@ -139,6 +139,16 @@ void ctkVTKScalarsToColorsView::addPlot(vtkPlot* plot)
|
|
void ctkVTKScalarsToColorsView::onBoundsChanged()
|
|
void ctkVTKScalarsToColorsView::onBoundsChanged()
|
|
{
|
|
{
|
|
this->boundAxesToChartBounds();
|
|
this->boundAxesToChartBounds();
|
|
|
|
+
|
|
|
|
+ // Set range to bounds only if range is invalid. Otherwise keep it as is, because
|
|
|
|
+ // the user wants to keep the range they set after a transfer function is shifted
|
|
|
|
+ double extent[8];
|
|
|
|
+ this->chartExtent(extent);
|
|
|
|
+ if (extent[0] >= extent[1])
|
|
|
|
+ {
|
|
|
|
+ this->setAxesToChartBounds();
|
|
|
|
+ }
|
|
|
|
+
|
|
this->Superclass::onChartUpdated();
|
|
this->Superclass::onChartUpdated();
|
|
}
|
|
}
|
|
|
|
|