The LookupTable has been assigned the same number of table values as
the number of colors in the ScalarBarActor.
aScalars->Delete();
theLookupTable->SetRange(aScalars->GetRange());
aScalars->Delete();
theLookupTable->SetRange(aScalars->GetRange());
+ theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors());
theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet);
theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet);
#include <vtkTextProperty.h>
#include <vtkScalarBarActor.h>
#include <vtkTextProperty.h>
#include <vtkScalarBarActor.h>
-#include <vtkScalarsToColors.h>
+#include <vtkLookupTable.h>
#define MINIMUM_WIDTH 70
#define MARGIN_SIZE 11
#define MINIMUM_WIDTH 70
#define MARGIN_SIZE 11
double aMin = myMinEdit->text().toDouble();
double aMax = myMaxEdit->text().toDouble();
double aMin = myMinEdit->text().toDouble();
double aMax = myMaxEdit->text().toDouble();
- myScalarBarActor->GetLookupTable()->SetRange( aMin, aMax );
+ vtkLookupTable* myLookupTable =
+ static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable());
+ myLookupTable->SetRange( aMin, aMax );
+ myLookupTable->SetNumberOfTableValues(myColorsSpin->value());
+ myLookupTable->Build();
SMESH::RepaintCurrentView();
} else {
// Scalar Bar preferences
SMESH::RepaintCurrentView();
} else {
// Scalar Bar preferences