Skip to content

Commit

Permalink
Fix invalid "tile under cursor" value (stored from a previously edite…
Browse files Browse the repository at this point in the history
…d map) (#9356)
  • Loading branch information
Districh-ru authored Dec 20, 2024
1 parent 0bc8a70 commit bd18290
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fheroes2/editor/editor_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,10 @@ namespace Interface

_gameArea.SetUpdateCursor();

// The cursor parameters may contain values from a previously edited map that are not suitable for this one. Reset them.
_tileUnderCursor = -1;
_areaSelectionStartTileId = -1;

uint32_t redrawFlags = REDRAW_GAMEAREA | REDRAW_RADAR | REDRAW_PANEL | REDRAW_STATUS | REDRAW_BORDER;
if ( conf.isEditorPassabilityEnabled() ) {
redrawFlags |= REDRAW_PASSABILITIES;
Expand Down

0 comments on commit bd18290

Please sign in to comment.