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
0d55ab2bb6
commit
90a4e7d438
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
|||
0.7.1: (Future)
|
||||
Bugfixes:
|
||||
- Switch: Fix final cleanup (fixes mgba.io/i/1283)
|
||||
- Qt: Fix tile and sprite views not always displaying at first
|
||||
Misc:
|
||||
- GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274)
|
||||
|
||||
|
|
|
@ -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