From 054a85fdca651844f969f44755b8531ab2e962d7 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 5 Aug 2010 00:43:33 +0000 Subject: Theme Editor: Added code generate/undo functionality to SkinViewer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27704 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/editorwindow.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'utils/themeeditor/gui/editorwindow.cpp') diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index 48ee76d..64443a1 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -428,7 +428,7 @@ void EditorWindow::shiftTab(int index) ui->actionCopy->setEnabled(false); ui->actionPaste->setEnabled(false); ui->actionFind_Replace->setEnabled(false); - viewer->setScene(0); + viewer->connectSkin(0); } else if(widget->type() == TabContent::Config) { @@ -441,7 +441,7 @@ void EditorWindow::shiftTab(int index) ui->actionCopy->setEnabled(false); ui->actionPaste->setEnabled(false); ui->actionFind_Replace->setEnabled(false); - viewer->setScene(0); + viewer->connectSkin(0); } else if(widget->type() == TabContent::Skin) { @@ -465,7 +465,8 @@ void EditorWindow::shiftTab(int index) sizeColumns(); /* Syncing the preview */ - viewer->setScene(doc->scene()); + viewer->connectSkin(doc); + } @@ -513,7 +514,7 @@ void EditorWindow::closeProject() dynamic_cast(doc)->setProject(project); if(i == ui->editorTabs->currentIndex()) { - viewer->setScene(dynamic_cast(doc)->scene()); + viewer->connectSkin(dynamic_cast(doc)); } } } @@ -630,7 +631,7 @@ void EditorWindow::configFileChanged(QString configFile) dynamic_cast(doc)->setProject(project); if(i == ui->editorTabs->currentIndex()) { - viewer->setScene(dynamic_cast(doc)->scene()); + viewer->connectSkin(dynamic_cast(doc)); } } } @@ -858,7 +859,7 @@ void EditorWindow::loadProjectFile(QString fileName) dynamic_cast(doc)->setProject(project); if(i == ui->editorTabs->currentIndex()) { - viewer->setScene(dynamic_cast(doc)->scene()); + viewer->connectSkin(dynamic_cast(doc)); } } } -- cgit v1.1