Skip to content

Commit

Permalink
fix assertion issue
Browse files Browse the repository at this point in the history
The for loop is surrounded by an if statement that prevents dashboard drawing until the dashboard is fully open.
  • Loading branch information
Tamir91 committed Feb 6, 2024
1 parent 1f50849 commit 86de5c7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions common/output-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,15 @@ void output_model::draw(ux_window& win, rect view_rect, device_models_list & dev
}

auto top = 0;
for(auto&& dash : dashboards)
if( is_dashboard_open && dashboard_width == max_dashboard_width )
{
auto h = dash->get_height();
auto r = rect{ 0.f, (float)top, get_dashboard_width() - 8.f, (float)h };
dash->draw(win, r);
top += h;
for( auto && dash : dashboards )
{
auto h = dash->get_height();
auto r = rect{ 0.f, (float)top, get_dashboard_width() - 8.f, (float)h };
dash->draw( win, r );
top += h;
}
}

dashboards.erase(std::remove_if(dashboards.begin(), dashboards.end(),
Expand Down

0 comments on commit 86de5c7

Please sign in to comment.