From 3f9b73812b4a8a823f28631614d1492df6060776 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Wed, 24 Sep 2014 11:55:22 +1000 Subject: [PATCH] Minor fixes and workarounds. --- apps/opencs/model/settings/usersettings.cpp | 14 ++++++++------ apps/opencs/view/settings/dialog.cpp | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/opencs/model/settings/usersettings.cpp b/apps/opencs/model/settings/usersettings.cpp index 95da7d150..42fd897b2 100644 --- a/apps/opencs/model/settings/usersettings.cpp +++ b/apps/opencs/model/settings/usersettings.cpp @@ -94,7 +94,6 @@ void UserSettings::buildSettingModelDefaults() waterEnabled->setMinimum (0); waterEnabled->setMaximum (100.00); // FIXME: not sure what the max value should be waterEnabled->setWidgetWidth (10); - //waterEnabled->setStyleSheet("QGroupBox { border:2px; padding 2px; margin: 2px;} QGroupBox::title { text: \"test\" }"); waterEnabled->setViewLocation(2, 6); Setting *weText = createSetting (Type_Undefined, page, "weText"); weText->setSpecialValueText("Water Enabled"); @@ -113,7 +112,7 @@ void UserSettings::buildSettingModelDefaults() waterLevel->setWidgetWidth (10); waterLevel->setViewLocation(3, 6); Setting *wlText = createSetting (Type_Undefined, page, "wlText"); - wlText->setSpecialValueText("Water Level"); // hack to place text labels + wlText->setSpecialValueText("Water Level"); wlText->setEditorSetting(false); wlText->setSerializable (false); wlText->setColumnSpan (1); @@ -129,7 +128,7 @@ void UserSettings::buildSettingModelDefaults() waterTimer->setWidgetWidth (10); waterTimer->setViewLocation(4, 6); Setting *wtText = createSetting (Type_Undefined, page, "wtText"); - wtText->setSpecialValueText("Water Timer"); // hack to place text labels + wtText->setSpecialValueText("Water Timer"); wtText->setEditorSetting(false); wtText->setSerializable (false); wtText->setColumnSpan (1); @@ -165,7 +164,10 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makePropertysetDefaultValue(4); fastFactor->setEditorSetting(false); fastFactor->setColumnSpan (1); - fastFactor->setMinimum (1); // FIXME: this function appears to be broken + // FIXME: setMinimum or setSpecialVlueText appears to be broken, possibly due + // to there being an empty string default for special value text. + fastFactor->setMinimum (1); + fastFactor->setSpecialValueText("1"); // workaround for above fastFactor->setMaximum (100); // FIXME: not sure what the max value should be fastFactor->setWidgetWidth (10); fastFactor->setViewLocation(1, 2); @@ -186,7 +188,7 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makePropertysetWidgetWidth (10); farClipDist->setViewLocation(2, 2); Setting *fcText = createSetting (Type_Undefined, page, "fcText"); - fcText->setSpecialValueText("Far Clip Distance"); // hack to place text labels + fcText->setSpecialValueText("Far Clip Distance"); fcText->setEditorSetting(false); fcText->setSerializable (false); fcText->setColumnSpan (1); @@ -202,7 +204,7 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makePropertysetWidgetWidth (10); timerStart->setViewLocation(3, 2); Setting *tsText = createSetting (Type_Undefined, page, "tsText"); - tsText->setSpecialValueText("Timer Start"); // hack to place text labels + tsText->setSpecialValueText("Timer Start"); tsText->setEditorSetting(false); tsText->setSerializable (false); tsText->setColumnSpan (1); diff --git a/apps/opencs/view/settings/dialog.cpp b/apps/opencs/view/settings/dialog.cpp index e328384e8..7d2b8f0a5 100644 --- a/apps/opencs/view/settings/dialog.cpp +++ b/apps/opencs/view/settings/dialog.cpp @@ -306,7 +306,7 @@ void CSVSettings::Dialog::buildPages() sbMinSubViewWidth->setValue(325); if(model()->hasSettingDefinitions("SubView/max subviews")) - sbMaxSubViews->setValue(model()->settingValue("SubView/max subview").toInt()); + sbMaxSubViews->setValue(model()->settingValue("SubView/max subviews").toInt()); else sbMaxSubViews->setValue(3);