@@ -22,6 +22,8 @@ var big_bounding_rectangle := Rect2i():
22
22
big_bounding_rectangle = value
23
23
if value .size == Vector2i (0 , 0 ):
24
24
set_process_input (false )
25
+ _set_default_cursor ()
26
+ dragged_gizmo = null
25
27
Global .can_draw = true
26
28
else :
27
29
set_process_input (true )
@@ -187,15 +189,20 @@ func _input(event: InputEvent) -> void:
187
189
if gizmo_hover :
188
190
Input .set_default_cursor_shape (gizmo_hover .get_cursor ())
189
191
else :
190
- var cursor := Input .CURSOR_ARROW
191
- if Global .cross_cursor :
192
- cursor = Input .CURSOR_CROSS
193
- var layer : BaseLayer = project .layers [project .current_layer ]
194
- if not layer .can_layer_get_drawn ():
195
- cursor = Input .CURSOR_FORBIDDEN
196
-
197
- if DisplayServer .cursor_get_shape () != cursor :
198
- Input .set_default_cursor_shape (cursor )
192
+ _set_default_cursor ()
193
+
194
+
195
+ func _set_default_cursor () -> void :
196
+ var project := Global .current_project
197
+ var cursor := Input .CURSOR_ARROW
198
+ if Global .cross_cursor :
199
+ cursor = Input .CURSOR_CROSS
200
+ var layer : BaseLayer = project .layers [project .current_layer ]
201
+ if not layer .can_layer_get_drawn ():
202
+ cursor = Input .CURSOR_FORBIDDEN
203
+
204
+ if DisplayServer .cursor_get_shape () != cursor :
205
+ Input .set_default_cursor_shape (cursor )
199
206
200
207
201
208
func _move_with_arrow_keys (event : InputEvent ) -> void :
0 commit comments