mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 08:50:36 +05:00
0022519: [CEA 1083]Impossible to graphicaly select an edge for MakeVertexOnCurve
This commit is contained in:
parent
2e6cd84715
commit
bae730c25a
@ -1123,7 +1123,6 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather( GEOM::GEOM_Object_ptr
|
|||||||
int theIndex )
|
int theIndex )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var object;
|
GEOM::GEOM_Object_var object;
|
||||||
bool found = false;
|
|
||||||
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
||||||
if ( study ) {
|
if ( study ) {
|
||||||
@ -1132,16 +1131,15 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather( GEOM::GEOM_Object_ptr
|
|||||||
_PTR(SObject) sobject( studyDS->FindObjectIOR( IOR.toLatin1().constData() ) );
|
_PTR(SObject) sobject( studyDS->FindObjectIOR( IOR.toLatin1().constData() ) );
|
||||||
if ( sobject ) {
|
if ( sobject ) {
|
||||||
_PTR(ChildIterator) it( studyDS->NewChildIterator( sobject ) );
|
_PTR(ChildIterator) it( studyDS->NewChildIterator( sobject ) );
|
||||||
for ( ; it->More() && !found; it->Next() ) {
|
for ( ; it->More(); it->Next() ) {
|
||||||
GEOM::GEOM_Object_var cobject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( it->Value() ) );
|
GEOM::GEOM_Object_var cobject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( it->Value() ) );
|
||||||
if ( !CORBA::is_nil( cobject ) ) {
|
if ( !CORBA::is_nil( cobject ) ) {
|
||||||
GEOM::ListOfLong_var indices = cobject->GetSubShapeIndices();
|
GEOM::ListOfLong_var indices = cobject->GetSubShapeIndices();
|
||||||
int length = indices->length();
|
int length = indices->length();
|
||||||
for ( int i = 0; i < length && !found; i++ ) {
|
// VSR 18/03/2014: we need only sub-shapes with single sub-shape index (to exclude groups, etc)
|
||||||
if ( indices[i] == theIndex ) {
|
if ( length == 1 && indices[0] == theIndex ) {
|
||||||
object = cobject;
|
object = cobject;
|
||||||
found = true;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user