//! Perfroms the fit all for the active view
virtual void fitAll() = 0;
+ //! Erases all presentations from the viewer
+ virtual void eraseAll() = 0;
+
//! Sets the view projection
/// \param theX the X projection value
/// \param theY the Y projection value
#include <OCCViewer_ViewPort3d.h>
#include <OCCViewer_ViewFrame.h>
-
+#include <SOCC_ViewModel.h>
#include <SUIT_ViewManager.h>
#include <QtxActionToolMgr.h>
}
}
+//**********************************************
+void SHAPERGUI_SalomeViewer::eraseAll()
+{
+ SOCC_Viewer* aViewer = dynamic_cast<SOCC_Viewer*>(myView->viewer());
+ aViewer->EraseAll(0);
+}
+
//**********************************************
void SHAPERGUI_SalomeViewer::setViewProjection(double theX, double theY,
double theZ, double theTwist)
//! Perfroms the fit all for the active view
virtual void fitAll();
+ //! Erases all presentations from the viewer
+ virtual void eraseAll();
+
//! Sets the view projection
/// \param theX the X projection value
/// \param theY the Y projection value
} else
action("SHOW_CMD")->setEnabled(true);
}
+ //issue #2159 Hide all incomplete behavior
+#ifdef HAVE_SALOME
+ action("HIDEALL_CMD")->setEnabled(true);
+#else
if (myWorkshop->displayer()->objectsCount() > 0)
action("HIDEALL_CMD")->setEnabled(true);
+#endif
// Update selection menu
QIntList aModes = aDisplayer->activeSelectionModes();
#endif
}
+void XGUI_ViewerProxy::eraseAll()
+{
+#ifdef HAVE_SALOME
+ myWorkshop->salomeConnector()->viewer()->eraseAll();
+#else
+#endif
+}
+
void XGUI_ViewerProxy::connectToViewer()
{
#ifdef HAVE_SALOME
//! Sets the view fitted all
virtual void fitAll();
+ //! Erases all presentations from the viewer
+ virtual void eraseAll();
+
/// Connects to a viewer according to current environment
void connectToViewer();
else if (theId == "WIREFRAME_CMD")
setDisplayMode(aObjects, XGUI_Displayer::Wireframe);
else if (theId == "HIDEALL_CMD") {
+#ifdef HAVE_SALOME
+ //issue #2159 Hide all incomplete behavior
+ viewer()->eraseAll();
+#else
QObjectPtrList aList = myDisplayer->displayedObjects();
foreach (ObjectPtr aObj, aList) {
if (module()->canEraseObject(aObj))
aObj->setDisplayed(false);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+#endif
updateCommandStatus();
} else if (theId == "SELECT_VERTEX_CMD") {
setViewerSelectionMode(TopAbs_VERTEX);