From 14ef294270600aa88d6bbe51d0e2e4b9963865e8 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 22 Apr 2016 16:32:10 +0300 Subject: [PATCH] Provide update of parameters folder on remove a one parameter in dialog box --- .../ParametersPlugin_WidgetParamsMgr.cpp | 18 +----------------- src/XGUI/XGUI_DataModel.cpp | 3 --- 2 files changed, 1 insertion(+), 20 deletions(-) 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(); -- 2.39.2