From 0bd4b565898443aca4cb9cbac7e65e730e119935 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 20 Jul 2014 20:03:16 +0200 Subject: [PATCH] Save to the right file. --HG-- branch : gsoc2014-dfighter --- .../translation_manager_main_window.cpp | 1 - .../src/plugins/translation_manager/uxt_editor.cpp | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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 b439edce6..c5228fae6 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 @@ -573,7 +573,6 @@ void CMainWindow::onUxtMapped( QString lang ) UXTEditor *e = new UXTEditor(); e->open( path ); - e->setCurrentFile( path ); _ui.mdiArea->addSubWindow( e ); e->activateWindow(); } diff --git a/code/studio/src/plugins/translation_manager/uxt_editor.cpp b/code/studio/src/plugins/translation_manager/uxt_editor.cpp index dc453b57f..38f8fa76d 100644 --- a/code/studio/src/plugins/translation_manager/uxt_editor.cpp +++ b/code/studio/src/plugins/translation_manager/uxt_editor.cpp @@ -105,11 +105,12 @@ void UXTEditor::open( QString filename ) int l = filename.lastIndexOf( "/" ); if( l == -1 ) return; - filename = filename.left( l ); - filename += "/wk.uxt"; + + QString fn = filename.left( l ); + fn += "/wk.uxt"; // The work file cannot be found, cannot proceed - STRING_MANAGER::loadStringFile( filename.toUtf8().constData(), infos, true ); + STRING_MANAGER::loadStringFile( fn.toUtf8().constData(), infos, true ); if( d_ptr->infos.size() == 0 ) return; } @@ -144,7 +145,10 @@ void UXTEditor::open( QString filename ) blockTableSignals( false ); setWidget( d_ptr->t ); - setCurrentFile( filename ); + + current_file = filename; + setWindowTitle( filename + "[*]" ); + setWindowFilePath( filename ); } void UXTEditor::save()