emit selectionChanged();
}
+//**************************************************************
+void XGUI_SelectionMgr::updateSelectionBy(const ModuleBase_ISelection::SelectionPlace& thePlace)
+{
+ QList<ModuleBase_ViewerPrs> aSelectedPrs =
+ myWorkshop->selector()->selection()->getSelected(thePlace);
+ if (thePlace == ModuleBase_ISelection::Browser) {
+ XGUI_Displayer* aDisplayer = myWorkshop->displayer();
+ aDisplayer->setSelected(aSelectedPrs);
+ }
+
+}
//**************************************************************
void XGUI_SelectionMgr::clearSelection()
{
#include "XGUI.h"
#include <ModuleBase_Definitions.h>
+#include <ModuleBase_ISelection.h>
#include <QObject>
#include <QModelIndexList>
//! Clears selection in Viewer and object Browser
void clearSelection();
+ /// Updates selection, which are depend on the selection in the given place
+ /// \thePlace a widget where selection has happened.
+ void updateSelectionBy(const ModuleBase_ISelection::SelectionPlace& thePlace);
+
signals:
//! Emited when selection in a one of viewers was changed
void selectionChanged();
moveObjects();
else if (theId == "COLOR_CMD")
changeColor(aObjects);
- else if (theId == "SHOW_CMD")
+ else if (theId == "SHOW_CMD") {
showObjects(aObjects, true);
+ mySelector->updateSelectionBy(ModuleBase_ISelection::Browser);
+ }
else if (theId == "HIDE_CMD")
showObjects(aObjects, false);
- else if (theId == "SHOW_ONLY_CMD")
+ else if (theId == "SHOW_ONLY_CMD") {
showOnlyObjects(aObjects);
+ mySelector->updateSelectionBy(ModuleBase_ISelection::Browser);
+ }
else if (theId == "SHADING_CMD")
setDisplayMode(aObjects, XGUI_Displayer::Shading);
else if (theId == "WIREFRAME_CMD")