summaryrefslogtreecommitdiff
path: root/utils/themeeditor/editorwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/editorwindow.cpp')
-rw-r--r--utils/themeeditor/editorwindow.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/utils/themeeditor/editorwindow.cpp b/utils/themeeditor/editorwindow.cpp
index 601e4d8..d137897 100644
--- a/utils/themeeditor/editorwindow.cpp
+++ b/utils/themeeditor/editorwindow.cpp
@@ -42,7 +42,19 @@ EditorWindow::EditorWindow(QWidget *parent) :
void EditorWindow::loadTabFromFile(QString fileName)
{
- /* Adding a new document for each file name */
+ /* Checking to see if the file is already open */
+ for(int i = 0; i < ui->editorTabs->count(); i++)
+ {
+ SkinDocument* current = dynamic_cast<SkinDocument*>
+ (ui->editorTabs->widget(i));
+ if(current->getFile() == fileName)
+ {
+ ui->editorTabs->setCurrentIndex(i);
+ return;
+ }
+ }
+
+ /* Adding a new document*/
SkinDocument* doc = new SkinDocument(parseStatus, fileName);
addTab(doc);