0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 03:29:49 +03:00

Fix removing layout in layout when removing item

This commit is contained in:
Emil Sawicki
2022-02-06 12:14:42 +01:00
parent ee07abb6c5
commit 02ee5864a3

View File

@@ -293,7 +293,7 @@ BaseDesignIntf *AbstractLayout::findPrior(BaseDesignIntf *item)
void AbstractLayout::slotOnChildDestroy(QObject* child) void AbstractLayout::slotOnChildDestroy(QObject* child)
{ {
m_children.removeAll(static_cast<BaseDesignIntf*>(child)); m_children.removeAll(static_cast<BaseDesignIntf*>(child));
if (m_children.count()<2){ if (m_children.count() < 2 && !static_cast<LayoutDesignIntf*>(child)){
beforeDelete(); beforeDelete();
} else { } else {
relocateChildren(); relocateChildren();