Skip to content

Commit

Permalink
remember last file name
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Nov 29, 2024
1 parent 6cecfb1 commit 1b77132
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions applications/Mapple/dialogs/dialog_walk_through.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}


Expand Down

0 comments on commit 1b77132

Please sign in to comment.