fix: widget bugs surfaced by new gtest coverage
- FrameRateComboBox: RepopulateList() left current index at -1 on first fill, so GetFrameRate() returned 0/1 instead of the displayed first entry until something called SetFrameRate() - HandMovableView: default_drag_mode_ was never initialized; an early Core::ToolChanged signal would setDragMode() with it (UB)
This commit is contained in:
@@ -177,7 +177,9 @@ private:
|
||||
.arg(VideoParams::FrameRateToString(custom_rate_)));
|
||||
}
|
||||
|
||||
inner_->setCurrentIndex(temp_index);
|
||||
// On the first populate there is no current index (-1); select the
|
||||
// first standard rate so GetFrameRate() matches what's displayed
|
||||
inner_->setCurrentIndex(qMax(temp_index, 0));
|
||||
|
||||
inner_->blockSignals(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user