mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix tile and sprite views not always displaying at first
This commit is contained in:
parent
0c9802e4da
commit
a36315097a
1
CHANGES
1
CHANGES
|
@ -6,6 +6,7 @@ Bugfixes:
|
|||
- GBA: Reset now reloads multiboot ROMs
|
||||
- GBA BIOS: Fix multiboot entry point (fixes Magic Floor)
|
||||
- Switch: Fix final cleanup (fixes mgba.io/i/1283)
|
||||
- Qt: Fix tile and sprite views not always displaying at first
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
|
|
@ -46,6 +46,9 @@ ObjView::ObjView(std::shared_ptr<CoreController> controller, QWidget* parent)
|
|||
m_ui.mode->setFont(font);
|
||||
|
||||
connect(m_ui.tiles, &TilePainter::indexPressed, this, &ObjView::translateIndex);
|
||||
connect(m_ui.tiles, &TilePainter::needsRedraw, this, [this]() {
|
||||
updateTiles(true);
|
||||
});
|
||||
connect(m_ui.objId, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ObjView::selectObj);
|
||||
connect(m_ui.magnification, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [this]() {
|
||||
updateTiles(true);
|
||||
|
|
|
@ -31,6 +31,7 @@ void TilePainter::resizeEvent(QResizeEvent* event) {
|
|||
if (width() / m_size != m_backing.width() / m_size || m_backing.height() != calculatedHeight) {
|
||||
m_backing = QPixmap(width(), calculatedHeight);
|
||||
m_backing.fill(Qt::transparent);
|
||||
emit needsRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ public slots:
|
|||
|
||||
signals:
|
||||
void indexPressed(int index);
|
||||
void needsRedraw();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
|
|
|
@ -25,6 +25,9 @@ TileView::TileView(std::shared_ptr<CoreController> controller, QWidget* parent)
|
|||
m_ui.tile->setController(controller);
|
||||
|
||||
connect(m_ui.tiles, &TilePainter::indexPressed, m_ui.tile, &AssetTile::selectIndex);
|
||||
connect(m_ui.tiles, &TilePainter::needsRedraw, this, [this]() {
|
||||
updateTiles(true);
|
||||
});
|
||||
connect(m_ui.paletteId, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &TileView::updatePalette);
|
||||
|
||||
switch (m_controller->platform()) {
|
||||
|
|
Loading…
Reference in New Issue