#include <OCCViewer_ViewManager.h>
+#include <SalomeApp_Study.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <LightApp_DataOwner.h>
HYDROGUI_Operation::abortOperation();
- module()->update( UF_OCCViewer | UF_FitAll );
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( module()->getApp()->activeStudy() );
+ if ( aStudy )
+ module()->update( UF_OCCViewer | UF_FitAll );
}
void HYDROGUI_LandCoverMapOp::commitOperation()
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 ) {