mirror of
https://github.com/gwm17/implot.git
synced 2024-11-26 20:28:50 -05:00
Draw query rect only when query enabled.
This commit is contained in:
parent
038a9c9282
commit
36a86cf955
|
@ -1345,6 +1345,8 @@ void EndPlot() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImHasFlag(plot.Flags, ImPlotFlags_Query)) // draw query rect only when query enabled.
|
||||||
|
{
|
||||||
if (plot.Querying || plot.Queried) {
|
if (plot.Querying || plot.Queried) {
|
||||||
if (plot.QueryRect.GetWidth() > 2 && plot.QueryRect.GetHeight() > 2) {
|
if (plot.QueryRect.GetWidth() > 2 && plot.QueryRect.GetHeight() > 2) {
|
||||||
DrawList.AddRectFilled(plot.QueryRect.Min + gp.BB_Plot.Min, plot.QueryRect.Max + gp.BB_Plot.Min, gp.Col_QryBg);
|
DrawList.AddRectFilled(plot.QueryRect.Min + gp.BB_Plot.Min, plot.QueryRect.Max + gp.BB_Plot.Min, gp.Col_QryBg);
|
||||||
|
@ -1360,6 +1362,7 @@ void EndPlot() {
|
||||||
DrawList.AddRectFilled(bb_query.Min, bb_query.Max, gp.Col_QryBg);
|
DrawList.AddRectFilled(bb_query.Min, bb_query.Max, gp.Col_QryBg);
|
||||||
DrawList.AddRect( bb_query.Min, bb_query.Max, gp.Col_QryBd);
|
DrawList.AddRect( bb_query.Min, bb_query.Max, gp.Col_QryBd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// render legend
|
// render legend
|
||||||
const float txt_ht = ImGui::GetTextLineHeight();
|
const float txt_ht = ImGui::GetTextLineHeight();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user