{
myIsApplyAndClose = true;
apply();
+ restoreOCCViewerSelection();
}
void HYDROGUI_Operation::onApply()
{
myIsApplyAndClose = false;
apply();
+ restoreOCCViewerSelection();
}
void HYDROGUI_Operation::setPrintErrorMessage( const bool theIsPrint )
if ( myPanel )
abortOperation();
myIsApplyAndClose = true;
+ restoreOCCViewerSelection();
}
+void HYDROGUI_Operation::restoreOCCViewerSelection()
+{
+ DEBTRACE("restoreOCCViewerSelection");
+ LightApp_Application* anApp = module()->getApp();
+ LightApp_SelectionMgr* sm = anApp->selectionMgr();
+ if(sm)
+ {
+ sm->clearFilters(); // see GEOM_Displayer::GlobalSelection
+ }
+ OCCViewer_ViewManager* aViewManager =
+ dynamic_cast<OCCViewer_ViewManager*>( anApp->getViewManager( OCCViewer_Viewer::Type(), true ) );
+ if( aViewManager )
+ {
+ if( OCCViewer_Viewer* aViewer = aViewManager->getOCCViewer() )
+ {
+ Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
+ if( !aCtx.IsNull() )
+ {
+ DEBTRACE("AIScontext " << aCtx.get());
+ aCtx->Deactivate();
+ aCtx->Activate(0);
+ aCtx->SetAutomaticHilight( Standard_True );
+ aCtx->RemoveFilters();
+ }
+ }
+ }
+}
void HYDROGUI_Operation::onHelp()
{
emit helpContextModule( getHelpComponent(), getHelpFile(), getHelpContext() );
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
//static int ZValueIncrement = 0;
static const double HYDROGUI_MAXIMAL_DEFLECTION = 1e-2;
void HYDROGUI_PolylineOp::startOperation()
{
+ DEBTRACE("startOperation");
if( myIsEdit )
{
if ( isApplyAndClose() )
void HYDROGUI_PolylineOp::commitOperation()
{
+ DEBTRACE("commitOperation");
if ( isApplyAndClose() )
{
restoreCursor();
QString& theErrorMsg,
QStringList& theBrowseObjectsEntries )
{
+ DEBTRACE("processApply");
HYDROGUI_PolylineDlg* aPanel = ::qobject_cast<HYDROGUI_PolylineDlg*>( inputPanel() );
if ( !aPanel )
return false;
void HYDROGUI_Shape::displayShape( const bool theIsUpdateViewer )
{
- DEBTRACE("displayShape " << theIsUpdateViewer << " " << mySelectionMode);
+ DEBTRACE("displayShape " << theIsUpdateViewer << " " << mySelectionMode << " AIScontext " << myContext.get());
// if ( myContext->HasOpenedContext() && mySelectionMode > 0 )
// myContext->CloseLocalContext();