From 73108d61b7ec6d205353d59c88e277690246c667 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 13 Apr 2006 09:43:51 +0000 Subject: [PATCH] Generate AVI on animation: correct BUGs --- src/VISUGUI/VisuGUI_TimeAnimation.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index b8afb4e9..2feb8519 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -1404,7 +1404,12 @@ void VisuGUI_TimeAnimationDlg::onSetupDlg() void VisuGUI_TimeAnimationDlg::onBrowse() { // QString aPath = SUIT_FileDlg::getExistingDirectory(this, "/", "Select path"); - QString aPath = SUIT_FileDlg::getExistingDirectory(this, getenv("HOME"), "Select path"); + QString aDir; + if (myPathEdit->text().isEmpty()) + aDir = getenv("HOME"); + else + aDir = myPathEdit->text(); + QString aPath = SUIT_FileDlg::getExistingDirectory(this, aDir, "Select path"); if (!aPath.isEmpty()) myPathEdit->setText(Qtx::addSlash(aPath)); } @@ -1416,7 +1421,14 @@ void VisuGUI_TimeAnimationDlg::onBrowseAVI() aFilter.append( "AVI Files (*.avi)" ); aFilter.append( "All Files (*.*)" ); - QString aPath = SUIT_FileDlg::getFileName(this, getenv("HOME"), aFilter, "Select file", false); + QString aDir; + if (myPathAVIEdit->text().isEmpty()) + aDir = getenv("HOME"); + else { + QFileInfo aFile(myPathAVIEdit->text()); + aDir = aFile.dirPath(true); + } + QString aPath = SUIT_FileDlg::getFileName(this, aDir, aFilter, "Select file", false); if (!aPath.isEmpty()) myPathAVIEdit->setText(aPath); } @@ -1430,7 +1442,7 @@ void VisuGUI_TimeAnimationDlg::onCheckDump(bool) if (mySaveAVICheck->isChecked()) mySaveAVICheck->setChecked(false); } - mySaveAVICheck->setEnabled(!mySaveCheck->isChecked()); + mySaveAVICheck->setEnabled(!mySaveCheck->isChecked() && myAnimator->checkAVIMaker()); } else if (source == mySaveAVICheck) { if (mySaveAVICheck->isChecked()) { -- 2.39.2