Allow only 1 instance of the uxt editor.

This commit is contained in:
dfighter1985 2014-07-18 01:08:31 +02:00
parent 80d0c7c9c6
commit b86fce833c

View file

@ -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 );