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));
}
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);
}
if (mySaveAVICheck->isChecked())
mySaveAVICheck->setChecked(false);
}
- mySaveAVICheck->setEnabled(!mySaveCheck->isChecked());
+ mySaveAVICheck->setEnabled(!mySaveCheck->isChecked() && myAnimator->checkAVIMaker());
}
else if (source == mySaveAVICheck) {
if (mySaveAVICheck->isChecked()) {