if we're given a layout, don't create another layout for it to live in
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879360
This commit is contained in:
parent
fdbd52d617
commit
8c7ed93278
@ -215,10 +215,14 @@ int TabBar::insertTab(int index, const QIcon &icon, const QString &label,
|
||||
QGraphicsWidget *page = new QGraphicsWidget(this);
|
||||
page->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
if (content) {
|
||||
if (content->isLayout()) {
|
||||
page->setLayout(static_cast<QGraphicsLayout *>(content));
|
||||
} else {
|
||||
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, page);
|
||||
layout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
page->setLayout(layout);
|
||||
layout->addItem(content);
|
||||
page->setLayout(layout);
|
||||
}
|
||||
} else {
|
||||
page->setPreferredSize(0, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user