summaryrefslogtreecommitdiff
path: root/lslayoutwindow.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-18 19:04:43 +0200
committerTreeki <treeki@gmail.com>2012-08-18 19:04:43 +0200
commit195efe4ebab933bfbba7f7bf06cf4592b865d008 (patch)
tree91faf02e27720c1aa55dffcac9291d3be4caeb89 /lslayoutwindow.cpp
parentc007cddf71a53b67f3642629d7c31400db5da93a (diff)
downloadLayoutStudio-195efe4ebab933bfbba7f7bf06cf4592b865d008.tar.gz
LayoutStudio-195efe4ebab933bfbba7f7bf06cf4592b865d008.zip
blah, an attempt to sort out the weird resizing of the scene tree
Diffstat (limited to '')
-rw-r--r--lslayoutwindow.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/lslayoutwindow.cpp b/lslayoutwindow.cpp
index 718e92d..867b6c8 100644
--- a/lslayoutwindow.cpp
+++ b/lslayoutwindow.cpp
@@ -5,7 +5,6 @@
#include <QGridLayout>
#include <QFormLayout>
#include <QGroupBox>
-#include <QSplitter>
LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, QWidget *parent) :
QMainWindow(parent) {
@@ -50,7 +49,7 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q
m_tabWidget->addTab(w, "Layout");
// prepare the Scene Graph tab
- QSplitter *gsplit = new QSplitter(this);
+ m_sceneSplitter = new QSplitter(this);
w = new QWidget(this);
QGridLayout *ggrid = new QGridLayout(w);
@@ -71,12 +70,19 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q
ggrid->addWidget(m_clearSearchButton, 0, 1, 1, 1);
ggrid->addLayout(m_sceneListSwitcher, 1, 0, 1, 2);
- m_paneEditor = new LSPaneEditor(this);
+ QWidget *switcherWidget = new QWidget(this);
+ m_paneEditorSwitcher = new QStackedLayout(switcherWidget);
- gsplit->addWidget(w);
- gsplit->addWidget(m_paneEditor);
+ m_paneEditor = new LSPaneEditor(switcherWidget);
- m_tabWidget->addTab(gsplit, "Scene Graph");
+ m_paneEditorSwitcher->addWidget(new QLabel("Choose a pane to edit from the left.", switcherWidget));
+ m_paneEditorSwitcher->addWidget(m_paneEditor);
+
+ m_sceneSplitter->addWidget(w);
+ m_sceneSplitter->addWidget(switcherWidget);
+ m_sceneSplitter->setCollapsible(1, false);
+
+ m_tabWidget->addTab(m_sceneSplitter, "Scene Graph");
// get the resource
@@ -125,8 +131,11 @@ LSLayoutWindow::~LSLayoutWindow() {
void LSLayoutWindow::selectedPaneChanged(const QModelIndex &current, const QModelIndex &previous) {
+ (void)previous;
LYTPane *pane = (LYTPane*)current.internalPointer();
+
m_paneEditor->setPane(pane);
+ m_paneEditorSwitcher->setCurrentIndex(1);
}