Qt: Fix adjusting magnification in tile viewer when not fitting to window

This commit is contained in:
Vicki Pfau 2019-04-30 18:16:44 -07:00
parent 0f9c4bbe60
commit 37a564da4c
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@ Other fixes:
- GB Core: Fix toggling WIN and OBJ being swapped
- All: Fix several memory leaks
- LR35902: Fix trailing whitespace in disassembly
- Qt: Fix adjusting magnification in tile viewer when not fitting to window
Misc:
- GBA Savedata: EEPROM performance fixes
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash

View File

@ -65,7 +65,10 @@ TileView::TileView(std::shared_ptr<CoreController> controller, QWidget* parent)
}
updateTiles(true);
});
connect(m_ui.magnification, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [this]() {
connect(m_ui.magnification, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [this](int mag) {
if (!m_ui.tileFit->isChecked()) {
m_ui.tiles->setMinimumSize(mag * 8 * m_ui.tilesPerRow->value(), m_ui.tiles->minimumSize().height());
}
updateTiles(true);
});