Skip to content

Commit 4ab8fb8

Browse files
committed
Merge pull request godotengine#93747 from KoBeWi/layer_of_bugs
Fix some TileMapLayer editing problems
2 parents 2f7973f + 92b0375 commit 4ab8fb8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

editor/plugins/tiles/tile_map_layer_editor.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,13 @@ bool TileMapLayerEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEven
763763
}
764764

765765
} else {
766-
// Released
767-
_stop_dragging();
766+
// Released.
768767
drag_erasing = false;
768+
if (drag_type == DRAG_TYPE_NONE) {
769+
return false;
770+
} else {
771+
_stop_dragging();
772+
}
769773
}
770774

771775
CanvasItemEditor::get_singleton()->update_viewport();

scene/2d/tile_map_layer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ void TileMapLayer::_update_self_texture_repeat(RS::CanvasItemTextureRepeat p_tex
18891889

18901890
#ifdef TOOLS_ENABLED
18911891
bool TileMapLayer::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
1892-
return get_cell_source_id(local_to_map(p_point)) != TileSet::INVALID_SOURCE;
1892+
return tile_set.is_valid() && get_cell_source_id(local_to_map(p_point)) != TileSet::INVALID_SOURCE;
18931893
}
18941894
#endif
18951895

0 commit comments

Comments
 (0)