Load and restore the Format correctly

master
Unknown 2019-03-29 17:03:48 +01:00
parent 90187ef57b
commit dbc060bba9
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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());