diff --git a/src/platform/qt/TileView.cpp b/src/platform/qt/TileView.cpp index 23cba18fd..3fba7ffd4 100644 --- a/src/platform/qt/TileView.cpp +++ b/src/platform/qt/TileView.cpp @@ -25,7 +25,20 @@ TileView::TileView(std::shared_ptr 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); });