if ( hydroObject )
{
SUIT_AbstractModel* treeModel = dynamic_cast<SUIT_AbstractModel*>( getApp()->objectBrowser()->model() );
- QString id = hydroObject->text( hydroObject->customData( Qtx::IdType ).toInt() );
- Qtx::VisibilityState visState = treeModel->visibilityState( id );
- if ( visState != Qtx::UnpresentableState )
+ if ( treeModel )
+ {
+ QString id = hydroObject->text( hydroObject->customData( Qtx::IdType ).toInt() );
+ Qtx::VisibilityState visState = treeModel->visibilityState( id );
+ if ( visState != Qtx::UnpresentableState )
treeModel->setVisibilityState( id, theState ? Qtx::ShownState : Qtx::HiddenState );
+ }
}
if ( theObject->GetKind() == KIND_BATHYMETRY && theState ) {
setObjectVisible( HYDROGUI_Tool::GetActiveViewId( this ), hydroObject->modelObject(), vis );
- update( UF_OCCViewer | ( visState == Qtx::ShownState ? UF_FitAll : 0 ) );
+ update( UF_OCCViewer | UF_VTKViewer | ( visState == Qtx::ShownState ? UF_FitAll : 0 ) );
}
Handle(HYDROData_StricklerTable) HYDROGUI_Module::getLandCoverColoringTable( const int theViewId ) const