mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-13 17:23:08 +00:00
Re-introduce is_syncing
This commit is contained in:
parent
abedba6f64
commit
acada6ef2c
|
@ -397,8 +397,10 @@ func attempt_config_share(from_idx: int, config: Dictionary = {}) -> void:
|
||||||
target_slot.tool_node.has_method("set_config")
|
target_slot.tool_node.has_method("set_config")
|
||||||
and target_slot.tool_node.has_method("update_config")
|
and target_slot.tool_node.has_method("update_config")
|
||||||
):
|
):
|
||||||
|
target_slot.tool_node.set("is_syncing", true)
|
||||||
target_slot.tool_node.set_config(config)
|
target_slot.tool_node.set_config(config)
|
||||||
target_slot.tool_node.update_config()
|
target_slot.tool_node.update_config()
|
||||||
|
target_slot.tool_node.set("is_syncing", false)
|
||||||
|
|
||||||
|
|
||||||
func reset_options() -> void:
|
func reset_options() -> void:
|
||||||
|
|
|
@ -2,6 +2,7 @@ class_name BaseTool
|
||||||
extends VBoxContainer
|
extends VBoxContainer
|
||||||
|
|
||||||
var is_moving := false
|
var is_moving := false
|
||||||
|
var is_syncing := false
|
||||||
var kname: String
|
var kname: String
|
||||||
var tool_slot: Tools.Slot = null
|
var tool_slot: Tools.Slot = null
|
||||||
var cursor_text := ""
|
var cursor_text := ""
|
||||||
|
@ -34,7 +35,8 @@ func _ready() -> void:
|
||||||
func save_config() -> void:
|
func save_config() -> void:
|
||||||
var config := get_config()
|
var config := get_config()
|
||||||
Global.config_cache.set_value(tool_slot.kname, kname, config)
|
Global.config_cache.set_value(tool_slot.kname, kname, config)
|
||||||
Tools.config_changed.emit(tool_slot.button, config)
|
if not is_syncing: # If the tool isn't busy syncing with another tool.
|
||||||
|
Tools.config_changed.emit(tool_slot.button, config)
|
||||||
|
|
||||||
|
|
||||||
func load_config() -> void:
|
func load_config() -> void:
|
||||||
|
|
Loading…
Reference in a new issue