changeset 51:8e5f9a9aa43f

add destructor (clean PropertyBox vector)
author lbajardsilogic
date Wed, 16 May 2007 11:34:30 +0000
parents 51b1cbf1a7d7
children 51fd00eae624
files widgets/PropertyStack.cpp widgets/PropertyStack.h
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/PropertyStack.cpp	Wed May 16 11:32:57 2007 +0000
+++ b/widgets/PropertyStack.cpp	Wed May 16 11:34:30 2007 +0000
@@ -71,6 +71,23 @@
 	    m_client, SLOT(propertyContainerSelected(View *, PropertyContainer *)));
 }
 
+PropertyStack::~PropertyStack()
+{
+	blockSignals(true);
+	
+	while (count() > 0) 
+	{
+		removeTab(0);
+    }
+    
+	for (size_t i = 0; i < m_boxes.size(); ++i) 
+	{
+		delete m_boxes[i];
+    }
+    m_boxes.clear();
+	m_client = 0;
+}
+
 void
 PropertyStack::repopulate()
 {
--- a/widgets/PropertyStack.h	Wed May 16 11:32:57 2007 +0000
+++ b/widgets/PropertyStack.h	Wed May 16 11:34:30 2007 +0000
@@ -31,6 +31,7 @@
 
 public:
     PropertyStack(QWidget *parent, View *client);
+	virtual ~PropertyStack();
 
     View *getClient() { return m_client; }
     bool containsContainer(PropertyContainer *container) const;