Do not add layouts twice

This fixes the warning "Attempting to add QLayout "" to LayoutEdit "", which
already has a layout" when the main window is created.
This commit is contained in:
Orivej Desh
2017-12-31 12:27:54 +00:00
parent d7624c5056
commit 826c171d53

View File

@ -32,7 +32,7 @@ LayoutEdit::LayoutEdit( LayoutManager* l )
cmbLayouts = new QComboBox(frame);
connect(cmbLayouts, SIGNAL(activated(int)), this, SLOT(load(int)));
QHBoxLayout *layoutLayout = new QHBoxLayout(this);
QHBoxLayout *layoutLayout = new QHBoxLayout();
//most of these buttons can link directly into slots in the LayoutManager
btnAdd = new QPushButton(frame);
@ -118,7 +118,7 @@ LayoutEdit::LayoutEdit( LayoutManager* l )
updateLayoutList();
//add the buttons at the bottom.
QHBoxLayout* h = new QHBoxLayout(this);
QHBoxLayout* h = new QHBoxLayout();
h->setMargin(0);
h->setSpacing(5);
QPushButton* close = new QPushButton(QIcon::fromTheme("window-close"), tr("&Close Dialog"), this );