X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.cpp;h=754034d3a3cc8b42178ae05569a920e59a5b9880;hb=dff2e776460fc98e6b234181479ec680a91e9623;hp=a83a67251145cd80563734a6f633f691d16ae2d6;hpb=4c74e5b864eef28128e27b3ece944990ca8f3fbe;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index a83a67251..754034d3a 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -130,7 +131,7 @@ void XGUI_DataTree::commitData(QWidget* theEditor) if (XGUI_Tools::canRename(aObj, aName)) { SessionPtr aMgr = ModelAPI_Session::get(); aMgr->startOperation("Rename"); - aObj->data()->setName(qPrintable(aName)); + aObj->data()->setName(aName.toStdString()); aMgr->finishOperation(); } } @@ -227,6 +228,8 @@ void XGUI_DataTree::processHistoryChange(const QModelIndex& theIndex) update(aModel->index(i, 1, aParent)); update(aModel->index(i, 2, aParent)); } + XGUI_ObjectsBrowser* aObjBrowser = qobject_cast(parent()); + aObjBrowser->workshop()->displayer()->updateViewer(); } void XGUI_DataTree::processEyeClick(const QModelIndex& theIndex) @@ -251,11 +254,11 @@ void XGUI_DataTree::processEyeClick(const QModelIndex& theIndex) // Update list of selected objects because this event happens after // selection event in object browser + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); + update(theIndex); if (aObjBrowser) { aObjBrowser->onSelectionChanged(); } - Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); - update(theIndex); } }