patch by Tom Kazimiers: update the scene filename when using Save-As in the GUI

metadata
Wenzel Jakob 2011-06-25 01:32:46 +02:00
parent c3a8ed7038
commit 91270fe291
1 changed files with 4 additions and 0 deletions

View File

@ -1398,8 +1398,12 @@ void MainWindow::onSaveAsDialogClose(int reason) {
QString fileName = dialog->selectedFiles().value(0);
settings.setValue("fileDialogState", dialog->saveState());
saveScene(this, context, fileName);
fs::path pathName = fileName.toStdString(),
baseName = fs::basename(pathName);
context->fileName = fileName;
context->shortName = QFileInfo(fileName).fileName();
context->scene->setSourceFile(pathName);
context->scene->setDestinationFile(baseName.file_string());
ui->tabBar->setTabText(currentIndex, context->shortName);
addRecentFile(fileName);
}