summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/NodeModel.cpp3
-rw-r--r--src/gui/Controls.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index 2975ecff..9e966f63 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -203,6 +203,9 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) c
min = min_atom.get_float();
if (max_atom.type() == Atom::FLOAT)
max = max_atom.get_float();
+
+ if (max <= min)
+ max = min + 1.0;
}
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index 27de1259..70d0ebc2 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -201,6 +201,8 @@ SliderControl::port_variable_change(const string& key, const Atom& value)
void
SliderControl::set_range(float min, float max)
{
+ if (min <= min)
+ max = min + 1.0;
_slider->set_range(min, max);
//_value_spinner->set_range(min, max);
}