From: vsv Date: Mon, 22 Sep 2008 10:34:22 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: TG_VISU_2008_Development_Finished~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3eeaf117f354291f95e6e72df4fc4ccd3a60feeb;p=modules%2Fvisu.git *** empty log message *** --- diff --git a/src/VISUGUI/VisuGUI_FilterScalarsDlg.cxx b/src/VISUGUI/VisuGUI_FilterScalarsDlg.cxx index ccca18b9..d3ff9025 100644 --- a/src/VISUGUI/VisuGUI_FilterScalarsDlg.cxx +++ b/src/VISUGUI/VisuGUI_FilterScalarsDlg.cxx @@ -20,6 +20,7 @@ #include "VisuGUI_FilterScalarsDlg.h" #include "VISU_ColoredPrs3d_i.hh" +#include "VISU_ColoredPrs3dHolder_i.hh" #include "VisuGUI.h" #include "VisuGUI_Tools.h" @@ -105,21 +106,27 @@ VisuGUI_FilterScalarsDlg::~VisuGUI_FilterScalarsDlg() 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; }