From 6731afc79c44a591887b0ef91d9c2c6c2468162c Mon Sep 17 00:00:00 2001 From: cc9cii Date: Fri, 5 Dec 2014 03:59:16 +1100 Subject: [PATCH] Use float for setting skill use values. Should resolve bug #2183. --- apps/opencs/model/world/columnimp.hpp | 2 +- apps/opencs/view/world/util.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/opencs/model/world/columnimp.hpp b/apps/opencs/model/world/columnimp.hpp index 6f830e6e3..eba73cf0b 100644 --- a/apps/opencs/model/world/columnimp.hpp +++ b/apps/opencs/model/world/columnimp.hpp @@ -272,7 +272,7 @@ namespace CSMWorld { ESXRecordT record2 = record.get(); - record2.mData.mUseValue[mIndex] = data.toInt(); + record2.mData.mUseValue[mIndex] = data.toFloat(); record.setModified (record2); } diff --git a/apps/opencs/view/world/util.cpp b/apps/opencs/view/world/util.cpp index f987c8d9f..c65e12c60 100644 --- a/apps/opencs/view/world/util.cpp +++ b/apps/opencs/view/world/util.cpp @@ -173,6 +173,8 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO { QDoubleSpinBox *dsb = new QDoubleSpinBox(parent); dsb->setRange(FLT_MIN, FLT_MAX); + dsb->setSingleStep(0.01f); + dsb->setDecimals(3); return dsb; }