mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 01:25:36 +05:00
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:
parent
09ecd3b11c
commit
a1119a1c80
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user