From: apo Date: Thu, 13 Apr 2006 09:43:51 +0000 (+0000) Subject: Generate AVI on animation: correct BUGs X-Git-Tag: T3_2_0b1_pre1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=73108d61b7ec6d205353d59c88e277690246c667;p=modules%2Fvisu.git Generate AVI on animation: correct BUGs --- 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()) {