Commit 2ed5250a authored by David Thompson's avatar David Thompson Committed by Kitware Robot

Merge topic 'group-item-cleanup' into release

ea6185e0 qtGroupItem should clean up its children.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Bob Obara's avatarBob Obara <bob.obara@kitware.com>
Merge-request: !1581
parents 71d0afea ea6185e0
Pipeline #138825 running with stage
...@@ -188,9 +188,10 @@ The following is an example of a Analysis View: ...@@ -188,9 +188,10 @@ The following is an example of a Analysis View:
###Changes to Group View ###Changes to Group View
* View no longer displays empty tabs * View no longer displays empty tabs.
* Current tabs are now remembered when the group rebuilds its widget - previously this was only true for the top-level tabbed group views * Current tabs are now remembered when the group rebuilds its widget - previously this was only true for the top-level tabbed group views.
* Fixed issue with displaying Discrete Items that has children * Fixed issue with displaying Discrete Items that has children.
* Fixed issue where child widgets were not deleted.
###Changes to UIManager ###Changes to UIManager
......
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
pqSMTKAttributeItemWidget(const AttributeItemInfo& info, Qt::Orientation orient = Qt::Horizontal); pqSMTKAttributeItemWidget(const AttributeItemInfo& info, Qt::Orientation orient = Qt::Horizontal);
pqSMTKAttributeItemWidget(smtk::attribute::ItemPtr, QWidget* p, pqSMTKAttributeItemWidget(smtk::attribute::ItemPtr, QWidget* p,
smtk::extension::qtBaseView* bview, Qt::Orientation orient = Qt::Horizontal); smtk::extension::qtBaseView* bview, Qt::Orientation orient = Qt::Horizontal);
virtual ~pqSMTKAttributeItemWidget(); ~pqSMTKAttributeItemWidget() override;
/// Subclasses must override this method to create the ParaView widget of their choice. /// Subclasses must override this method to create the ParaView widget of their choice.
virtual bool createProxyAndWidget(vtkSMProxy*& source, pqInteractivePropertyWidget*& widget) = 0; virtual bool createProxyAndWidget(vtkSMProxy*& source, pqInteractivePropertyWidget*& widget) = 0;
...@@ -102,11 +102,11 @@ public slots: ...@@ -102,11 +102,11 @@ public slots:
void setOutputOptional(int optionEnabled); void setOutputOptional(int optionEnabled);
protected slots: protected slots:
virtual void updateItemData(); void updateItemData() override;
virtual void acceptWidgetValues(); virtual void acceptWidgetValues();
protected: protected:
virtual void createWidget(); void createWidget() override;
virtual void clearChildWidgets(); virtual void clearChildWidgets();
virtual void updateUI(); virtual void updateUI();
virtual void createEditor(); virtual void createEditor();
......
...@@ -63,6 +63,14 @@ qtGroupItem::qtGroupItem(const AttributeItemInfo& info) ...@@ -63,6 +63,14 @@ qtGroupItem::qtGroupItem(const AttributeItemInfo& info)
qtGroupItem::~qtGroupItem() qtGroupItem::~qtGroupItem()
{ {
for (auto& entry : this->Internals->ExtensibleMap)
{
for (auto qi : entry)
{
delete qi->widget();
delete qi;
}
}
delete this->Internals; delete this->Internals;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment