mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Don't let world editor's property list's refresh get called muliple times in a frame.
This commit is contained in:
parent
42c91d88d9
commit
c3a51582c4
@ -7,6 +7,7 @@ var _edited_resource : WorldGenBaseResource = null
|
||||
var properties : Array = Array()
|
||||
|
||||
var _ignore_changed_evend : bool = false
|
||||
var _refresh_queued : bool = false
|
||||
|
||||
var _plugin : EditorPlugin = null
|
||||
var _undo_redo : UndoRedo = null
|
||||
@ -460,6 +461,8 @@ func refresh() -> void:
|
||||
|
||||
$MainContainer/HBoxContainer/ClassLE.text = cls_str
|
||||
$MainContainer/HBoxContainer2/ScriptLE.text = script_str
|
||||
|
||||
_refresh_queued = false
|
||||
|
||||
func edit_resource(wgw) -> void:
|
||||
if _edited_resource:
|
||||
@ -476,5 +479,9 @@ func edit_resource(wgw) -> void:
|
||||
func on_edited_resource_changed() -> void:
|
||||
if _ignore_changed_evend:
|
||||
return
|
||||
|
||||
if _refresh_queued:
|
||||
return
|
||||
|
||||
_refresh_queued = true
|
||||
call_deferred("refresh")
|
||||
|
Loading…
Reference in New Issue
Block a user