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.
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.