]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Generate AVI on animation: correct BUGs
authorapo <apo@opencascade.com>
Thu, 13 Apr 2006 09:43:51 +0000 (09:43 +0000)
committerapo <apo@opencascade.com>
Thu, 13 Apr 2006 09:43:51 +0000 (09:43 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx

index b8afb4e9f136f7245010e3735160621e55301710..2feb8519e976e661efd9ef43d75944b5a5f543ca 100644 (file)
@@ -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()) {