diff --git a/geometrywidget.cpp b/geometrywidget.cpp index 13d686a..4fb4241 100644 --- a/geometrywidget.cpp +++ b/geometrywidget.cpp @@ -97,7 +97,6 @@ QString GeometryWidget::getGeometry() const Geometry geometry; Geometry::Format format = getFormat(); switch (format) { - case Geometry::FormatNone: case Geometry::CenterDimensions: geometry.setCenterDimensions( m_ui_CD_center[0]->value(), @@ -121,6 +120,7 @@ QString GeometryWidget::getGeometry() const break; case Geometry::FormatCustom: return ui->geometry_custom->text(); + case Geometry::FormatNone: default: return ""; break; diff --git a/mainwindow.cpp b/mainwindow.cpp index c2c19e1..255030b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -622,8 +622,7 @@ void MainWindow::writeProfile() profile->beginGroup("area"); //tab2 area profile->setValue("scalefactor",ui->scalefactor->currentIndex()); - profile->setValue("geometry",ui->geometry->getGeometry()); - profile->setValue("geometry_format",ui->geometry->getFormatStr()); + profile->setValue("geometry", ui->geometry->getGeometry()); profile->setValue("minY",ui->minY->value()); profile->setValue("maxY",ui->maxY->value()); profile->setValue("geometry_granularity", meGeometryGranularity.key(ui->geometrymode_granularity_group->checkedId())); @@ -728,7 +727,6 @@ void MainWindow::readProfile() profile->beginGroup("area"); //tab2 Area ui->scalefactor->setCurrentIndex(profile->value("scalefactor",0).toInt()); ui->geometry->set(profile->value("geometry").toString(), Geometry::FormatUnknown); - //ui->geometry->setFormat(profile->value("geometry_format").toString()); // TODO: Load and set the format correctly ui->checkBox_maxY->setChecked(profile->value("checkBox_maxY",false).toBool()); ui->checkBox_minY->setChecked(profile->value("checkBox_minY",false).toBool()); ui->maxY->setValue(profile->value("maxY",0).toInt());