mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix selecting tiles in OBJ-only view (fixes #2497)
This commit is contained in:
parent
7093d083dd
commit
672867f1f6
|
@ -25,7 +25,20 @@ TileView::TileView(std::shared_ptr<CoreController> controller, QWidget* parent)
|
|||
m_ui.setupUi(this);
|
||||
m_ui.tile->setController(controller);
|
||||
|
||||
connect(m_ui.tiles, &TilePainter::indexPressed, m_ui.tile, &AssetTile::selectIndex);
|
||||
connect(m_ui.tiles, &TilePainter::indexPressed, this, [this](int index) {
|
||||
if (m_ui.tilesObj->isChecked()) {
|
||||
switch (m_controller->platform()) {
|
||||
#ifdef M_CORE_GBA
|
||||
case mPLATFORM_GBA:
|
||||
index += 2048 >> m_ui.palette256->isChecked();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_ui.tile->selectIndex(index);
|
||||
});
|
||||
connect(m_ui.tiles, &TilePainter::needsRedraw, this, [this]() {
|
||||
updateTiles(true);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue