X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_ObjectsBrowser.cpp;h=69cc9c616c58b32feda738a6194f444cfacd5a26;hb=965adcb3288bda478cdd045d4b2f90c92980d099;hp=4268115fde4477d1bbe52412c4d440a4ca291c04;hpb=dd0b6ecf11d2f4de3b26cd41ce615f1a01aaf7b9;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index 4268115fd..69cc9c616 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + #include "XGUI_ObjectsBrowser.h" #include "XGUI_DocumentDataModel.h" #include "XGUI_Tools.h" @@ -58,7 +60,7 @@ void XGUI_DataTree::mouseDoubleClickEvent(QMouseEvent* theEvent) QModelIndex aIndex = currentIndex(); XGUI_DocumentDataModel* aModel = dataModel(); ObjectPtr aObject = aModel->object(aIndex); - ResultPartPtr aPart = boost::dynamic_pointer_cast(aObject); + ResultPartPtr aPart = std::dynamic_pointer_cast(aObject); if (aPart) { aPart->activate(); } @@ -84,6 +86,14 @@ void XGUI_DataTree::commitData(QWidget* theEditor) } } +void XGUI_DataTree::clear() +{ + mySelectedData.clear(); + XGUI_DocumentDataModel* aModel = dataModel(); + aModel->clear(); + reset(); +} + //******************************************************************** //******************************************************************** //******************************************************************** @@ -328,7 +338,7 @@ void XGUI_ObjectsBrowser::rebuildDataTree() } //*************************************************** -void XGUI_ObjectsBrowser::setObjectsSelected(const QList& theObjects) +void XGUI_ObjectsBrowser::setObjectsSelected(const QObjectPtrList& theObjects) { QList theIndexes; QItemSelectionModel* aSelectModel = myTreeView->selectionModel(); @@ -344,7 +354,15 @@ void XGUI_ObjectsBrowser::setObjectsSelected(const QList& theObjects) } //*************************************************** -void XGUI_ObjectsBrowser::processEvent(const boost::shared_ptr& theMessage) +void XGUI_ObjectsBrowser::processEvent(const std::shared_ptr& theMessage) { myDocModel->processEvent(theMessage); } + + +//*************************************************** +void XGUI_ObjectsBrowser::clearContent() +{ + myObjectsList.clear(); + myTreeView->clear(); +}