#include <QList>
#include <LightApp_SelectionMgr.h>
-#define _DEVDEBUG_
+//#define _DEVDEBUG_
#include "HYDRO_trace.hxx"
HYDROGUI_BathymetrySelectionOp::HYDROGUI_BathymetrySelectionOp( HYDROGUI_Module* theModule )
QList<Handle(HYDROGUI_BathymetryPrs)> baths = getShownBathymetries( module() );
if( isActive )
{
-// QList<SUIT_Selector*> aSelectorList;
-// QString aViewType = OCCViewer_Viewer::Type();
-// LightApp_SelectionMgr* aSelectionMgr = module()->getApp()->selectionMgr();
-// aSelectionMgr->selectors(aViewType, aSelectorList);
-// QList<SUIT_Selector*>::iterator anIter, anIterEnd = aSelectorList.end();
-// for( anIter = aSelectorList.begin(); anIter != anIterEnd; anIter++ )
-// {
-// SUIT_Selector* aSelector = *anIter;
-// aSelector->setEnabled( false );
-// }
-
const int aSelectionMode = 1; // Cf. AIS_PointCloud 0=selection by points ?
- //ctx->Deactivate( Standard_True );
- //ctx->OpenLocalContext( Standard_True );
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
{
DEBTRACE("bathy name: " << bath->GetShape()->getObject()->GetName().toStdString());
ctx->Deactivate(bath);
ctx->RemoveFilters();
- //ctx->Activate( bath, aSelectionMode, Standard_True );
ctx->SetSelectionModeActive (bath, aSelectionMode, Standard_True, AIS_SelectionModesConcurrency_Multiple, Standard_False);
- ctx->SetSelectionModeActive (bath, 0, Standard_True, AIS_SelectionModesConcurrency_Multiple, Standard_False);
bath->SetAutoHilight( Standard_False ); // True bloque le passage dans hilightSelected...
-// DEBTRACE("immediateMode: " << ctx->MainPrsMgr()->IsImmediateModeOn());
-// if (!ctx->MainPrsMgr()->IsImmediateModeOn())
-// ctx->MainPrsMgr()->BeginImmediateDraw();
}
ctx->UpdateCurrentViewer();
}
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
{
bath->ClearSelected();
+ bath->ClearSelectedPoints();
bath->SetAutoHilight( Standard_True );
bath->GetShape()->TextLabels( false );
ctx->Deactivate( bath );
ctx->SetSelectionModeActive (bath, 2, Standard_True, AIS_SelectionModesConcurrency_Multiple, Standard_False);
}
- //ctx->CloseLocalContext( -1, Standard_True );
}
myIsActive = isActive;