Fix cursor tile rect not updating for selections
This commit is contained in:
parent
0b5414ace3
commit
611e787122
2 changed files with 8 additions and 1 deletions
|
@ -15,6 +15,9 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
|||
- If an object event is inanimate, it will always render using its first frame.
|
||||
- Only log "Unknown custom script function" when a registered script function is not present in any script.
|
||||
|
||||
### Fixed
|
||||
- Fix cursor tile outline not updating at the end of a dragged selection.
|
||||
|
||||
## [4.5.0] - 2021-12-26
|
||||
### Added
|
||||
- WSL project paths are now supported. (For example, \wsl$\Ubuntu-20.04\home\huderlem\pokeemerald)
|
||||
|
|
|
@ -993,7 +993,6 @@ void Editor::updateCursorRectPos(int x, int y) {
|
|||
this->cursorMapTileRect->updateLocation(x, y);
|
||||
if (ui->graphicsView_Map->scene())
|
||||
ui->graphicsView_Map->scene()->update();
|
||||
Scripting::cb_BlockHoverChanged(x, y);
|
||||
}
|
||||
|
||||
void Editor::setCursorRectVisible(bool visible) {
|
||||
|
@ -1023,6 +1022,7 @@ void Editor::onHoveredMapMetatileChanged(const QPoint &pos) {
|
|||
.arg(pos.y())
|
||||
.arg(QString::number(zoomLevels[this->scaleIndex], 'g', 2)));
|
||||
}
|
||||
Scripting::cb_BlockHoverChanged(pos.x(), pos.y());
|
||||
}
|
||||
|
||||
void Editor::onHoveredMapMetatileCleared() {
|
||||
|
@ -1047,6 +1047,7 @@ void Editor::onHoveredMapMovementPermissionChanged(int x, int y) {
|
|||
.arg(this->getMovementPermissionText(collision, elevation));
|
||||
this->ui->statusBar->showMessage(message);
|
||||
}
|
||||
Scripting::cb_BlockHoverChanged(x, y);
|
||||
}
|
||||
|
||||
void Editor::onHoveredMapMovementPermissionCleared() {
|
||||
|
@ -1172,6 +1173,9 @@ void Editor::mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item
|
|||
} else {
|
||||
item->floodFill(event);
|
||||
}
|
||||
} else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
|
||||
// Update the tile rectangle at the end of a click-drag selection
|
||||
this->updateCursorRectPos(pos.x(), pos.y());
|
||||
} else {
|
||||
this->setSmartPathCursorMode(event);
|
||||
this->setStraightPathCursorMode(event);
|
||||
|
|
Loading…
Reference in a new issue