Skip to content

Commit

Permalink
Disable update spinner when debug redraw is active
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Oct 11, 2023
1 parent 4b7cc99 commit 41fa6c3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ void EditorNode::_notification(int p_what) {
}

void EditorNode::_update_update_spinner() {
update_spinner->set_visible(EDITOR_GET("interface/editor/show_update_spinner"));
update_spinner->set_visible(!RenderingServer::get_singleton()->canvas_item_get_debug_redraw() && EDITOR_GET("interface/editor/show_update_spinner"));

const bool update_continuously = EDITOR_GET("interface/editor/update_continuously");
PopupMenu *update_popup = update_spinner->get_popup();
Expand Down
4 changes: 4 additions & 0 deletions servers/rendering/renderer_canvas_cull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,10 @@ void RendererCanvasCull::canvas_item_set_debug_redraw(bool p_enabled) {
RSG::canvas_render->set_debug_redraw(p_enabled, debug_redraw_time, debug_redraw_color);
}

bool RendererCanvasCull::canvas_item_get_debug_redraw() const {
return debug_redraw;
}

void RendererCanvasCull::canvas_item_set_canvas_group_mode(RID p_item, RS::CanvasGroupMode p_mode, float p_clear_margin, bool p_fit_empty, float p_fit_margin, bool p_blur_mipmaps) {
Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_NULL(canvas_item);
Expand Down
1 change: 1 addition & 0 deletions servers/rendering/renderer_canvas_cull.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ class RendererCanvasCull {
void canvas_item_set_canvas_group_mode(RID p_item, RS::CanvasGroupMode p_mode, float p_clear_margin = 5.0, bool p_fit_empty = false, float p_fit_margin = 0.0, bool p_blur_mipmaps = false);

void canvas_item_set_debug_redraw(bool p_enabled);
bool canvas_item_get_debug_redraw() const;

RID canvas_light_allocate();
void canvas_light_initialize(RID p_rid);
Expand Down
1 change: 1 addition & 0 deletions servers/rendering/rendering_server_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ class RenderingServerDefault : public RenderingServer {
FUNC6(canvas_item_set_canvas_group_mode, RID, CanvasGroupMode, float, bool, float, bool)

FUNC1(canvas_item_set_debug_redraw, bool)
FUNC0RC(bool, canvas_item_get_debug_redraw)

FUNCRIDSPLIT(canvas_light)

Expand Down
1 change: 1 addition & 0 deletions servers/rendering_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,7 @@ class RenderingServer : public Object {
virtual void canvas_item_set_canvas_group_mode(RID p_item, CanvasGroupMode p_mode, float p_clear_margin = 5.0, bool p_fit_empty = false, float p_fit_margin = 0.0, bool p_blur_mipmaps = false) = 0;

virtual void canvas_item_set_debug_redraw(bool p_enabled) = 0;
virtual bool canvas_item_get_debug_redraw() const = 0;

/* CANVAS LIGHT */
virtual RID canvas_light_create() = 0;
Expand Down

0 comments on commit 41fa6c3

Please sign in to comment.