From d7564b2fdab05731fa024e8bd099b00840736a80 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 18 Jul 2014 01:08:31 +0200 Subject: [PATCH] Allow only 1 instance of the uxt editor. --- .../translation_manager_main_window.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp index 59e8d5ebe..aafc6f473 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp @@ -552,8 +552,13 @@ void CMainWindow::mergeSingleFile() void CMainWindow::onUxtClicked() { - UXTEditor *e = new UXTEditor(); QString path = work_path + "/" + QString( Constants::WK_UXT ); + path.replace( "\\", "/" ); + + if( getEditorByWindowFilePath( path ) != NULL ) + return; + + UXTEditor *e = new UXTEditor(); e->open( path ); e->setCurrentFile( path ); _ui.mdiArea->addSubWindow( e );