mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 01:18:46 +00:00
Save to the right file.
This commit is contained in:
parent
b8ff30885a
commit
58bf7c4dee
2 changed files with 8 additions and 5 deletions
|
@ -573,7 +573,6 @@ void CMainWindow::onUxtMapped( QString lang )
|
||||||
|
|
||||||
UXTEditor *e = new UXTEditor();
|
UXTEditor *e = new UXTEditor();
|
||||||
e->open( path );
|
e->open( path );
|
||||||
e->setCurrentFile( path );
|
|
||||||
_ui.mdiArea->addSubWindow( e );
|
_ui.mdiArea->addSubWindow( e );
|
||||||
e->activateWindow();
|
e->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,11 +105,12 @@ void UXTEditor::open( QString filename )
|
||||||
int l = filename.lastIndexOf( "/" );
|
int l = filename.lastIndexOf( "/" );
|
||||||
if( l == -1 )
|
if( l == -1 )
|
||||||
return;
|
return;
|
||||||
filename = filename.left( l );
|
|
||||||
filename += "/wk.uxt";
|
QString fn = filename.left( l );
|
||||||
|
fn += "/wk.uxt";
|
||||||
|
|
||||||
// The work file cannot be found, cannot proceed
|
// 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 )
|
if( d_ptr->infos.size() == 0 )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +145,10 @@ void UXTEditor::open( QString filename )
|
||||||
blockTableSignals( false );
|
blockTableSignals( false );
|
||||||
|
|
||||||
setWidget( d_ptr->t );
|
setWidget( d_ptr->t );
|
||||||
setCurrentFile( filename );
|
|
||||||
|
current_file = filename;
|
||||||
|
setWindowTitle( filename + "[*]" );
|
||||||
|
setWindowFilePath( filename );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UXTEditor::save()
|
void UXTEditor::save()
|
||||||
|
|
Loading…
Reference in a new issue