Skip to content

fix: remove resource leak when modify is not allowed#2282

Open
steff-o wants to merge 1 commit intoorigo-map:masterfrom
ornskoldsvikskommun:fix-editor-no-modify
Open

fix: remove resource leak when modify is not allowed#2282
steff-o wants to merge 1 commit intoorigo-map:masterfrom
ornskoldsvikskommun:fix-editor-no-modify

Conversation

@steff-o
Copy link
Contributor

@steff-o steff-o commented Feb 20, 2026

Fixes: #2281

Function isActive()from editHandler prevented interactions from being removed if there was no modify interaction. Turns out the function didn't actually do anything useful as it checked for undefined, and clearing interactions resets them to null, so it always returned true after the first edit session even if it was not. There was already a FIXME comment for that in the code.

Instead of fixing isActive() I removed it and rewrote removeInteractions() to always remove all interactions as that can never fail anyway, so no need to test.

Also removed a double usage of variable snap as that was temporarily used as bool at startup which caused removeInteractions() to crash if not checked for active the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor leaks resources when modify geometry tool is disabled

1 participant