Qt: Fix scrollbar arrows in memory view (fixes #1558)

This commit is contained in:
Vicki Pfau 2019-12-05 16:19:54 -08:00
parent c300da9be6
commit e51d3e105f
2 changed files with 14 additions and 0 deletions

View File

@ -97,6 +97,7 @@ Other fixes:
- Core: Fix uninitialized memory issues with graphics caches - Core: Fix uninitialized memory issues with graphics caches
- Vita: Fix analog controls (fixes mgba.io/i/1554) - Vita: Fix analog controls (fixes mgba.io/i/1554)
- Qt: Fix fast forward mute being reset (fixes mgba.io/i/1574) - Qt: Fix fast forward mute being reset (fixes mgba.io/i/1574)
- Qt: Fix scrollbar arrows in memory view (fixes mgba.io/i/1558)
Misc: Misc:
- GB Memory: Support manual SRAM editing (fixes mgba.io/i/1580) - GB Memory: Support manual SRAM editing (fixes mgba.io/i/1580)

View File

@ -88,6 +88,19 @@ MemoryModel::MemoryModel(QWidget* parent)
update(); update();
}); });
connect(verticalScrollBar(), &QSlider::actionTriggered, [this](int action) {
if (action == QSlider::SliderSingleStepAdd) {
++m_top;
} else if (action == QSlider::SliderSingleStepSub) {
--m_top;
} else {
return;
}
boundsCheck();
verticalScrollBar()->setValue(m_top);
update();
});
setRegion(0, 0x10000000, tr("All")); setRegion(0, 0x10000000, tr("All"));
} }