You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImPlot heavily relies on DragLineX call order but it shall not (IMO)
Hello.
Let us change the void ShowDemo_DragLines() code the following way:
Old code:
`ImPlot::DragLineX(0,&x1,ImVec4(1,1,1,1),1,flags);
ImPlot::DragLineX(1,&x2,ImVec4(1,1,1,1),1,flags);
New code:
if (x1 < x2) {
ImPlot::DragLineX(0, &x1, ImVec4(1, 1, 1, 1), 1, flags);
ImPlot::DragLineX(1, &x2, ImVec4(1, 1, 1, 1), 1, flags);
}
else {
ImPlot::DragLineX(1, &x2, ImVec4(1, 1, 1, 1), 1, flags);
ImPlot::DragLineX(0, &x1, ImVec4(1, 1, 1, 1), 1, flags);
}`
And everything stops working if one dragging lineX goes over the another one.
In my very case the drag lines are sorted and I cannot afford to use static variable in a real-life application.
Please, inform me if it is the intentional behavior.
The text was updated successfully, but these errors were encountered:
ImPlot heavily relies on DragLineX call order but it shall not (IMO)
Hello.
Let us change the void ShowDemo_DragLines() code the following way:
Old code:
`ImPlot::DragLineX(0,&x1,ImVec4(1,1,1,1),1,flags);
ImPlot::DragLineX(1,&x2,ImVec4(1,1,1,1),1,flags);
New code:
if (x1 < x2) {
ImPlot::DragLineX(0, &x1, ImVec4(1, 1, 1, 1), 1, flags);
ImPlot::DragLineX(1, &x2, ImVec4(1, 1, 1, 1), 1, flags);
}
else {
ImPlot::DragLineX(1, &x2, ImVec4(1, 1, 1, 1), 1, flags);
ImPlot::DragLineX(0, &x1, ImVec4(1, 1, 1, 1), 1, flags);
}`
And everything stops working if one dragging lineX goes over the another one.
In my very case the drag lines are sorted and I cannot afford to use static variable in a real-life application.
Please, inform me if it is the intentional behavior.
The text was updated successfully, but these errors were encountered: