Skip to content

Commit

Permalink
Delete markers left when deleting a trigger in editor
Browse files Browse the repository at this point in the history
When deleting a trigger object in the editor, its resize markers were still visible. Clicking on any of them caused a game crash.

They are now flushed into the sector before being checked for.
  • Loading branch information
Vankata453 committed Jul 20, 2024
1 parent d63d479 commit b366b97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/editor/overlay_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ EditorOverlayWidget::delete_markers()
if (m_selected_object && m_selected_object->is_valid())
m_selected_object->editor_deselect();

sector->flush_game_objects(); // Flush any markers queued to be added
for (auto& marker : sector->get_objects_by_type<MarkerObject>())
{
marker.remove_me();
Expand Down

0 comments on commit b366b97

Please sign in to comment.