Debug PAL8101: SMesh: Controls - Scalar bar properties works wrong.

The LookupTable has been assigned the same number of table values as
the number of colors in the ScalarBarActor.
This commit is contained in:
msv 2006-04-06 13:33:54 +00:00
parent 09ecd3b11c
commit a1119a1c80
2 changed files with 7 additions and 2 deletions

View File

@ -284,6 +284,7 @@ void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor,
aScalars->Delete();
theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors());
theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet);

View File

@ -58,7 +58,7 @@
#include <vtkTextProperty.h>
#include <vtkScalarBarActor.h>
#include <vtkScalarsToColors.h>
#include <vtkLookupTable.h>
#define MINIMUM_WIDTH 70
#define MARGIN_SIZE 11
@ -520,7 +520,11 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
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