X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ObjSelector.cxx;h=a79c1f6b2d1cea3102cc98d318992090a2396f54;hb=ca0e09c1e1bb19c9855e2f3839243da36097ee1c;hp=04bd20f0c0c4d67f5386a436cfe388b0278763d3;hpb=0d25f237574f54902a8d972ebc613301acfe3e43;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ObjSelector.cxx b/src/HYDROGUI/HYDROGUI_ObjSelector.cxx index 04bd20f0..a79c1f6b 100644 --- a/src/HYDROGUI/HYDROGUI_ObjSelector.cxx +++ b/src/HYDROGUI/HYDROGUI_ObjSelector.cxx @@ -39,8 +39,12 @@ #include #include -HYDROGUI_ObjSelector::HYDROGUI_ObjSelector( HYDROGUI_Module* theModule, QWidget* theParent ) -: QAbstractButton( theParent ), myModule( theModule ) +HYDROGUI_ObjSelector::HYDROGUI_ObjSelector( HYDROGUI_Module* theModule, + const ObjectKind theObjectKind, + QWidget* theParent ) +: QAbstractButton( theParent ), + myObjectKind( theObjectKind ), + myModule( theModule ) { QHBoxLayout* aLayout = new QHBoxLayout( this ); aLayout->setMargin( 0 ); @@ -97,7 +101,8 @@ void HYDROGUI_ObjSelector::OnSelectionChanged() QString anObjName; Handle(HYDROData_Object) anObject = HYDROGUI_Tool::GetSelectedObject( myModule ); if( !anObject.IsNull() ) - anObjName = anObject->GetName(); + if( myObjectKind == KIND_UNKNOWN || myObjectKind == anObject->GetKind() ) + anObjName = anObject->GetName(); SetName( anObjName ); } @@ -117,3 +122,8 @@ void HYDROGUI_ObjSelector::Clear() myObjName->clear(); myBtn->setChecked( false ); } + +void HYDROGUI_ObjSelector::SetChecked( const bool theState ) +{ + myBtn->setChecked( theState ); +}