#include "VisuGUI_FilterScalarsDlg.h"
#include "VISU_ColoredPrs3d_i.hh"
+#include "VISU_ColoredPrs3dHolder_i.hh"
#include "VisuGUI.h"
#include "VisuGUI_Tools.h"
void VisuGUI_FilterScalarsDlg::onSelectionEvent()
{
+ typedef SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > TColoredPrs3dPtr;
VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects( myVisuGUI );
+ myColoredPrs3d = TColoredPrs3dPtr();
if ( !aSelectionInfo.empty() ) {
VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
- if ( VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase )
+ if ( VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase ) {
if ( VISU::ColoredPrs3d_i* aColoredPrs3d = dynamic_cast< VISU::ColoredPrs3d_i* >( aBase ) ) {
- myRangeBox->setChecked( aColoredPrs3d->IsScalarFilterUsed() );
- myMinEdit->setText( QString::number( aColoredPrs3d->GetScalarFilterMin() ) );
- myMaxEdit->setText( QString::number( aColoredPrs3d->GetScalarFilterMax() ) );
myColoredPrs3d = aColoredPrs3d;
+ } else if (VISU::ColoredPrs3dHolder_i* aHolder =
+ dynamic_cast< VISU::ColoredPrs3dHolder_i* >( aBase )) {
+ myColoredPrs3d = aHolder->GetPrs3dDevice();
+ }
+ if (myColoredPrs3d.get() != NULL) {
+ myRangeBox->setChecked( myColoredPrs3d->IsScalarFilterUsed() );
+ myMinEdit->setText( QString::number( myColoredPrs3d->GetScalarFilterMin() ) );
+ myMaxEdit->setText( QString::number( myColoredPrs3d->GetScalarFilterMax() ) );
setEnabled( true );
return;
}
+ }
}
- typedef SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > TColoredPrs3dPtr;
- myColoredPrs3d = TColoredPrs3dPtr();
setEnabled( false );
return;
}