myAddButton->setEnabled(( myListWidget->count() < myMaxSize || myMaxSize == -1 ) &&
( mySelectedIDs.size() > 0 ) &&
( mySelectedIDs.size() <= myMaxSize || myMaxSize == -1 ) );
+ myRemoveButton->setEnabled( mySelectedIDs.size() > 0 );
//Connect Selected Ids in viewer and dialog's Ids list
bool signalsBlocked = myListWidget->blockSignals( true );
GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry )
{
GEOM::GEOM_Object_var aGeomObj;
- SALOMEDS::Study_var aStudy = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
- if ( !aStudy->_is_nil() )
+ SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toUtf8().data() );
+ if (!aSObj->_is_nil() )
{
- SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( theEntry.toLatin1().data() );
- if (!aSObj->_is_nil() )
- {
- CORBA::Object_var obj = aSObj->GetObject();
- aGeomObj = GEOM::GEOM_Object::_narrow(obj);
- aSObj->UnRegister();
- }
+ CORBA::Object_var obj = aSObj->GetObject();
+ aGeomObj = GEOM::GEOM_Object::_narrow(obj);
+ aSObj->UnRegister();
}
return aGeomObj._retn();
}