You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Unify and streamline connecting to Resource changes
This commit is contained in:
@@ -43,11 +43,11 @@ void StyleBoxPreview::_grid_preview_toggled(bool p_active) {
|
||||
|
||||
void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
|
||||
if (stylebox.is_valid()) {
|
||||
stylebox->disconnect("changed", callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
|
||||
stylebox->disconnect_changed(callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
|
||||
}
|
||||
stylebox = p_stylebox;
|
||||
if (stylebox.is_valid()) {
|
||||
stylebox->connect("changed", callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
|
||||
stylebox->connect_changed(callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
|
||||
}
|
||||
Ref<StyleBoxTexture> sbt = stylebox;
|
||||
grid_preview->set_visible(sbt.is_valid());
|
||||
|
||||
Reference in New Issue
Block a user