From: vsv Date: Fri, 6 Mar 2020 09:25:13 +0000 (+0300) Subject: Issue #18737 (Tuleap): Update viewer on show preview command X-Git-Tag: V9_5_0a2~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ef2fef2e945c3094bcc1a350264fe2e905731a8;p=modules%2Fshaper.git Issue #18737 (Tuleap): Update viewer on show preview command --- diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetCreator.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetCreator.cpp index a144ce739..1efc0d9e0 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetCreator.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetCreator.cpp @@ -38,11 +38,11 @@ ModuleBase_ModelWidget* ParametersPlugin_WidgetCreator::createWidgetByType(const std::string& theType, QWidget* theParent, Config_WidgetAPI* theWidgetApi, - ModuleBase_IWorkshop* /*theWorkshop*/) + ModuleBase_IWorkshop* theWorkshop) { ModuleBase_ModelWidget* aModelWidget = 0; if (theType == "parameters-manager") { - aModelWidget = new ParametersPlugin_WidgetParamsMgr(theParent, theWidgetApi); + aModelWidget = new ParametersPlugin_WidgetParamsMgr(theParent, theWidgetApi, theWorkshop); } return aModelWidget; } diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp index 9938df1e6..959969785 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp @@ -37,6 +37,8 @@ #include #include +#include +#include #include #include @@ -178,9 +180,9 @@ void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor, ///////////////////////////////////////////////////////////////////////////////////////////////// ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent, - const Config_WidgetAPI* theData) + const Config_WidgetAPI* theData, ModuleBase_IWorkshop* theWorkshop) : ModuleBase_ModelDialogWidget(theParent, theData), - isUpplyBlocked(false) + myWorkshop(theWorkshop), isUpplyBlocked(false) { QVBoxLayout* aLayout = new QVBoxLayout(this); @@ -857,4 +859,5 @@ void ParametersPlugin_WidgetParamsMgr::onShowPreview() SessionPtr aMgr = ModelAPI_Session::get(); aMgr->blockAutoUpdate(false); aMgr->blockAutoUpdate(true); -} \ No newline at end of file + myWorkshop->viewer()->update(); +} diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h index 444cd0cfb..b7042d10c 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h @@ -29,7 +29,7 @@ class QTreeWidgetItem; class ParametersPlugin_ItemDelegate; class QPushButton; class QToolButton; - +class ModuleBase_IWorkshop; /*! * \ingroup GUI @@ -61,7 +61,8 @@ class ParametersPlugin_WidgetParamsMgr : public ModuleBase_ModelDialogWidget Q_OBJECT public: /// Constructs a model widget - ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData); + ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData, + ModuleBase_IWorkshop* theWorkshop); /// Destructs the model widget virtual ~ParametersPlugin_WidgetParamsMgr() {} @@ -158,6 +159,8 @@ private: void updateParametersFeatures(); + ModuleBase_IWorkshop* myWorkshop; + ParametersPlugin_TreeWidget* myTable; QTreeWidgetItem* myFeatures; QTreeWidgetItem* myParameters;