fixed default camera driver when the config file doesn't exist yet

This commit is contained in:
matlabbe
2015-04-25 17:30:15 -04:00
parent ee77755f7c
commit f91efd245b
2 changed files with 6 additions and 2 deletions

View File

@@ -2253,7 +2253,8 @@ void MainWindow::drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords
void MainWindow::showEvent(QShowEvent* anEvent)
{
this->setWindowModified(false);
//if the config file doesn't exist, make the GUI obsolete
this->setWindowModified(!QFile::exists(_preferencesDialog->getIniFilePath()));
}
void MainWindow::moveEvent(QMoveEvent* anEvent)

View File

@@ -166,6 +166,10 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui->openni2_exposure->setEnabled(CameraOpenNI2::exposureGainAvailable());
_ui->openni2_gain->setEnabled(CameraOpenNI2::exposureGainAvailable());
// Default Driver
connect(_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(int)), this, SLOT(updateOpenNI2GroupBoxVisibility()));
this->resetSettings(_ui->groupBox_source0);
_ui->predictionPlot->showLegend(false);
QButtonGroup * buttonGroup = new QButtonGroup(this);
@@ -297,7 +301,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
//openni group
connect(_ui->groupBox_sourceOpenni, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(int)), this, SLOT(updateOpenNI2GroupBoxVisibility()));
connect(_ui->openni2_autoWhiteBalance, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_autoExposure, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_exposure, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));