Commit b625ea64 authored by Artur Grunau's avatar Artur Grunau
Browse files

NumericProperty: use step size in de- and increment()

Numeric properties were previously incremented and decremented by 1 cast
to the property's underlying type, e.g. tgt::vec2(1). That worked fine
for integer-based properties, but those storing floating-point numbers
could benefit from using the step value in decrement() and increment().
Now that's exactly how NumericProperty behaves.
parent ecf594d5
......@@ -307,12 +307,12 @@ namespace campvis {
template<typename T>
void campvis::NumericProperty<T>::increment() {
this->setValue(this->_value + T(1));
this->setValue(this->_value + this->_stepValue);
}
template<typename T>
void campvis::NumericProperty<T>::decrement() {
this->setValue(this->_value - T(1));
this->setValue(this->_value - this->_stepValue);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment