Skip to content

Commit 8361f90

Browse files
authored
Delete widgets without parents in CDockAreaLayout. (#241)
1 parent c44d0c8 commit 8361f90

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/DockAreaWidget.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ class CDockAreaLayout
8686

8787
}
8888

89+
/**
90+
* Delete widgets without parents in this layout
91+
*/
92+
~CDockAreaLayout()
93+
{
94+
for(auto Widget : m_Widgets)
95+
{
96+
if(!Widget->parent())
97+
delete Widget;
98+
}
99+
}
100+
89101
/**
90102
* Returns the number of widgets in this layout
91103
*/

0 commit comments

Comments
 (0)