// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
//
#include "SHAPERGUI_SalomeViewer.h"
#include <SUIT_ViewManager.h>
#include <QtxActionToolMgr.h>
+#include <SALOME_AISShape.hxx>
#include <SelectMgr_ListIteratorOfListOfFilter.hxx>
#include <QMouseEvent>
#include <QContextMenuEvent>
-//#define SALOME_PATCH_FOR_CTRL_WHEEL
+#define SALOME_PATCH_FOR_CTRL_WHEEL
SHAPERGUI_SalomeView::SHAPERGUI_SalomeView(OCCViewer_Viewer* theViewer)
: ModuleBase_IViewWindow(), myCurrentView(0)
//**********************************************
void SHAPERGUI_SalomeViewer::eraseAll()
{
- SOCC_Viewer* aViewer = dynamic_cast<SOCC_Viewer*>(myView->viewer());
- aViewer->EraseAll(0);
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ if (aContext.IsNull())
+ return;
+ AIS_ListOfInteractive aList;
+ aContext->DisplayedObjects(aList);
+ AIS_ListIteratorOfListOfInteractive aLIt;
+ Handle(AIS_InteractiveObject) anAISIO;
+ for (aLIt.Initialize(aList); aLIt.More(); aLIt.Next()) {
+ anAISIO = aLIt.Value();
+ Handle(Standard_Type) aType = anAISIO->DynamicType();
+ if (anAISIO->IsKind(STANDARD_TYPE(SALOME_AISShape))) {
+ aContext->Erase(anAISIO, false);
+ }
+ }
}
//**********************************************