Skip to content

Commit 1b98f65

Browse files
authored
onBeginEdit only fires once per drag in DraggableTextEditValue (#207)
1 parent ff70897 commit 1b98f65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/sst/jucegui/components/DraggableTextEditableValue.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,12 @@ void DraggableTextEditableValue::mouseDrag(const juce::MouseEvent &e)
138138
}
139139

140140
auto d = e.getDistanceFromDragStartY();
141+
if (!everDragged)
142+
{
143+
onBeginEdit();
144+
}
145+
141146
everDragged = true;
142-
onBeginEdit();
143147

144148
auto fac = dragScale * (e.mods.isShiftDown() ? dragShiftRatio : 1.f);
145149
auto nv = valueOnMouseDown - fac * d * continuous()->getMinMaxRange() * 0.01f;

0 commit comments

Comments
 (0)