#include <HYDROGUI_Operations.h>
#include <OCCViewer_ViewManager.h>
#include <LightApp_Application.h>
+#include <SUIT_Selector.h>
#include <QAction>
#include <QApplication>
+#include <QString>
+#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 )
{
- const int aSelectionMode = 1; // 2 AIS_PointCloud selection bounding box
- //ctx->Deactivate( Standard_True );
- //ctx->OpenLocalContext( Standard_True );
+ const int aSelectionMode = 1; // Cf. AIS_PointCloud 0=selection by points ?
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
{
DEBTRACE("bathy name: " << bath->GetShape()->getObject()->GetName().toStdString());
ctx->Deactivate(bath);
- ctx->Activate( bath, aSelectionMode, Standard_True );
- bath->SetAutoHilight( Standard_False );
+ ctx->RemoveFilters();
+ ctx->SetSelectionModeActive (bath, aSelectionMode, Standard_True, AIS_SelectionModesConcurrency_Multiple, Standard_False);
+ bath->SetAutoHilight( Standard_False ); // True bloque le passage dans hilightSelected...
}
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;