Skip to content

Commit

Permalink
gui: ensure buckets will be populated when using no filter index / pr…
Browse files Browse the repository at this point in the history
…event menu from being hidden when selecting an index

Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed Jun 3, 2024
1 parent f51bda8 commit 1f9fe1f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/gui/src/chartsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void ChartsWidget::changeMode()
clearChart();

if (mode_menu_->currentIndex() == SLACK_HISTOGRAM) {
filters_menu_->setCurrentIndex(0);
filters_menu_->show();
setSlackHistogram();
}
Expand Down Expand Up @@ -180,10 +181,6 @@ void ChartsWidget::showToolTip(bool is_hovering, int bar_index)

void ChartsWidget::clearChart()
{
if (filters_menu_->isVisible()) {
filters_menu_->hide();
}

buckets_->positive.clear();
buckets_->negative.clear();

Expand Down Expand Up @@ -639,7 +636,13 @@ void ChartsWidget::changeStartEndFilter()
}

setBucketInterval();
populateBuckets(nullptr, &paths);

if (!end_points.empty()) {
populateBuckets(&end_points, nullptr);
} else if (!paths.empty()) {
populateBuckets(nullptr, &paths);
}

setVisualConfig();

prev_filter_index_ = filter_index;
Expand Down

0 comments on commit 1f9fe1f

Please sign in to comment.