patch by Tom Kazimiers: update the scene filename when using Save-As in the GUI
parent
c3a8ed7038
commit
91270fe291
|
@ -1398,8 +1398,12 @@ void MainWindow::onSaveAsDialogClose(int reason) {
|
||||||
QString fileName = dialog->selectedFiles().value(0);
|
QString fileName = dialog->selectedFiles().value(0);
|
||||||
settings.setValue("fileDialogState", dialog->saveState());
|
settings.setValue("fileDialogState", dialog->saveState());
|
||||||
saveScene(this, context, fileName);
|
saveScene(this, context, fileName);
|
||||||
|
fs::path pathName = fileName.toStdString(),
|
||||||
|
baseName = fs::basename(pathName);
|
||||||
context->fileName = fileName;
|
context->fileName = fileName;
|
||||||
context->shortName = QFileInfo(fileName).fileName();
|
context->shortName = QFileInfo(fileName).fileName();
|
||||||
|
context->scene->setSourceFile(pathName);
|
||||||
|
context->scene->setDestinationFile(baseName.file_string());
|
||||||
ui->tabBar->setTabText(currentIndex, context->shortName);
|
ui->tabBar->setTabText(currentIndex, context->shortName);
|
||||||
addRecentFile(fileName);
|
addRecentFile(fileName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue