From: vsv Date: Fri, 22 Apr 2016 13:32:10 +0000 (+0300) Subject: Provide update of parameters folder on remove a one parameter in dialog box X-Git-Tag: V_2.3.0~127 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=14ef294270600aa88d6bbe51d0e2e4b9963865e8;p=modules%2Fshaper.git Provide update of parameters folder on remove a one parameter in dialog box --- diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp index 45c10175d..6d1aa4814 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp @@ -79,29 +79,12 @@ void ParametersPlugin_ItemDelegate::paint(QPainter* painter, painter->setPen(Qt::darkGray); painter->drawRect(option.rect); painter->setPen(aPen); - - //QString aText = index.data().toString(); - //if ((aText == NoName) || (aText == NoValue)) - // painter->setPen(Qt::red); QStyledItemDelegate::paint(painter, option, index); - - //painter->setPen(aPen); painter->setBrush(aBrush); } -//QWidget* ParametersPlugin_ItemDelegate::createEditor(QWidget* parent, -// const QStyleOptionViewItem& option, -// const QModelIndex& index) const -//{ -// QWidget* aWgt = QStyledItemDelegate::createEditor(parent, option, index); -// aWgt->setMinimumSize(option.rect.width() - option.decorationSize.width(), -// option.rect.height()); -// return aWgt; -//} - - ///////////////////////////////////////////////////////////////////////////////////////////////// ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData) @@ -529,6 +512,7 @@ void ParametersPlugin_WidgetParamsMgr::onRemove() aDoc->removeFeature(aFeature); } + Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)); Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)); updateFeaturesPart(); } diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 47c0af292..ebf1db998 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -234,9 +234,6 @@ void XGUI_DataModel::processEvent(const std::shared_ptr& theMess QModelIndex aIndex = objectIndex(aObject); if (aIndex.isValid()) { emit dataChanged(aIndex, aIndex); - } else { - rebuildDataTree(); - break; } } else { rebuildDataTree();