From 1b771322270f6556f1f47fab398c32b58a7d8b62 Mon Sep 17 00:00:00 2001 From: Liangliang Nan Date: Fri, 29 Nov 2024 15:47:01 +0100 Subject: [PATCH] remember last file name --- .../Mapple/dialogs/dialog_walk_through.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/Mapple/dialogs/dialog_walk_through.cpp b/applications/Mapple/dialogs/dialog_walk_through.cpp index c2bdbe78..a619a79b 100644 --- a/applications/Mapple/dialogs/dialog_walk_through.cpp +++ b/applications/Mapple/dialogs/dialog_walk_through.cpp @@ -137,18 +137,18 @@ void DialogWalkThrough::showEvent(QShowEvent* e) { doubleSpinBoxCharacterHeightFactor->setValue(walkThrough()->height_factor()); doubleSpinBoxCharacterDistanceFactor->setValue(walkThrough()->third_person_forward_factor()); + if (lineEditOutputFile->text().isEmpty()) { #ifdef HAS_FFMPEG - std::string name = "./video.mp4"; - if (viewer_->currentModel()) - name = file_system::replace_extension(viewer_->currentModel()->name(), "mp4"); + std::string name = "./video.mp4"; + if (viewer_->currentModel()) + name = file_system::replace_extension(viewer_->currentModel()->name(), "mp4"); #else - std::string name = "./video.png"; - if (viewer_->currentModel()) - name = file_system::replace_extension(viewer_->currentModel()->name(), "png"); + std::string name = "./video.png"; + if (viewer_->currentModel()) + name = file_system::replace_extension(viewer_->currentModel()->name(), "png"); #endif - - lineEditOutputFile->setText(QString::fromStdString(name)); -// QDialog::showEvent(e); + lineEditOutputFile->setText(QString::fromStdString(name)); + } }