Skip to content

Commit

Permalink
Fix an issue when switching to nodal
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 25, 2021
1 parent a5e7a82 commit 2d9ac2c
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,12 @@ void ScenarioDocumentPresenter::startTimeBar()
bool visible = context().app.settings<Scenario::Settings::Model>().getTimeBar();
auto itv_display = std::get_if<CentralIntervalDisplay>(&m_centralDisplay);
visible &= bool(itv_display);
auto itv_pres = itv_display->presenter.intervalPresenter();
visible &= bool(itv_pres);
IntervalPresenter* itv_pres{};
if(itv_display)
{
itv_pres = itv_display->presenter.intervalPresenter();
visible &= bool(itv_pres);
}

view().view().currentTimebar = &displayedInterval().duration;
view().view().currentView = itv_pres ? itv_pres->view() : nullptr;
Expand Down

0 comments on commit 2d9ac2c

Please sign in to comment.