]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Provide update of parameters folder on remove a one parameter in dialog box
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 22 Apr 2016 13:32:10 +0000 (16:32 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 22 Apr 2016 13:32:22 +0000 (16:32 +0300)
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp
src/XGUI/XGUI_DataModel.cpp

index 45c10175d263d3e484c97e4cb1179c76e9cfb7d3..6d1aa48141432f3c9efeca9b0bb8c237415856c6 100644 (file)
@@ -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();
   }
index 47c0af2923de050d7723cd8edb9dbd2eb6f4325b..ebf1db998f9d98d129d7989d172e3c92834a86b6 100644 (file)
@@ -234,9 +234,6 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
         QModelIndex aIndex = objectIndex(aObject);
         if (aIndex.isValid()) {
           emit dataChanged(aIndex, aIndex);
-        } else {
-          rebuildDataTree();
-          break;
         }
       } else {
         rebuildDataTree();