}
else
{
- data.width = columnWidth( ind );
- data.resizeable = header()->isResizeEnabled( ind );
+ int w = columnWidth( ind );
+ bool r = header()->isResizeEnabled( ind );
setColumnWidth( ind, 0 );
header()->setResizeEnabled( false, ind );
+ data.width = w;
+ data.resizeable = r;
}
updateContents();
}
if ( !obj || !study )
return aDataObj;
- if ( obj->GetName().size() ) { // skip nameless SObjects
- _PTR(SComponent) aSComp ( obj );
-
+ _PTR(SObject) refObj;
+ if ( obj->GetName().size() || obj->ReferencedObject( refObj ) ) // skip nameless non references SObjects
+ {
+ _PTR(SComponent) aSComp( obj );
aDataObj = aSComp ? new SalomeApp_ModuleObject( aSComp, parent ) :
new SalomeApp_DataObject ( obj, parent );
for ( ; it->More();it->Next() ) {
// don't use shared_ptr here, for Data Object will take
// ownership of this pointer
- _PTR(SObject) aSO ( it->Value() );
+ _PTR(SObject) aSO( it->Value() );
BuildTree( aSO, aDataObj, study );
}
}
if ( myObject )
str = myObject->GetName().c_str();
+ if ( str.isEmpty() )
+ {
+ _PTR(SObject) refObj = referencedObject();
+ if ( refObj )
+ str = refObj->GetName().c_str();
+ }
+
if ( isReference() )
str = QString( "* " ) + str;