summaryrefslogtreecommitdiff
path: root/lslayoutwindow.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-18 04:29:13 +0200
committerTreeki <treeki@gmail.com>2012-08-18 04:29:13 +0200
commita55b7493b1bd54e9d1231fa18300e0f882700fe3 (patch)
treeed1e1eb8da7a10b49278e3a0801980d0663ea201 /lslayoutwindow.cpp
parent56bf2bd3ff73fc3cd86dcb4f4cd1e42016522bea (diff)
downloadLayoutStudio-a55b7493b1bd54e9d1231fa18300e0f882700fe3.tar.gz
LayoutStudio-a55b7493b1bd54e9d1231fa18300e0f882700fe3.zip
made pane visibility part of the scene graph tree
Diffstat (limited to '')
-rw-r--r--lslayoutwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lslayoutwindow.cpp b/lslayoutwindow.cpp
index d19e397..718e92d 100644
--- a/lslayoutwindow.cpp
+++ b/lslayoutwindow.cpp
@@ -85,11 +85,13 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q
m_widthBox->setValue(m_layout->width);
m_heightBox->setValue(m_layout->height);
+ LSSceneModel *scnModel = new LSSceneModel(m_layout, true, this);
+
m_sceneGraph->setSelectionMode(QAbstractItemView::ExtendedSelection);
m_sceneGraph->setDragEnabled(true);
m_sceneGraph->setAcceptDrops(true);
m_sceneGraph->setDropIndicatorShown(true);
- m_sceneGraph->setModel(new LSSceneModel(m_layout, this));
+ m_sceneGraph->setModel(scnModel);
m_sceneGraph->expandAll();
connect(m_sceneGraph->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(selectedPaneChanged(QModelIndex,QModelIndex)));
@@ -107,6 +109,7 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q
m_renderer->show();
connect(m_paneEditor, SIGNAL(mustRedrawLayout()), m_renderer, SLOT(updateGL()));
+ connect(scnModel, SIGNAL(paneVisibilityChanged()), m_renderer, SLOT(updateGL()));
// clean up here
setAttribute(Qt::WA_DeleteOnClose);