Prevent Theme resource from emitting changes during bulk operations
This commit is contained in:
parent
afe1d1672f
commit
9cd96ebe0e
3 changed files with 86 additions and 69 deletions
|
|
@ -41,6 +41,11 @@ class Theme : public Resource {
|
|||
GDCLASS(Theme, Resource);
|
||||
RES_BASE_EXTENSION("theme");
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
friend class ThemeItemImportTree;
|
||||
friend class ThemeItemEditorDialog;
|
||||
#endif
|
||||
|
||||
public:
|
||||
enum DataType {
|
||||
DATA_TYPE_COLOR,
|
||||
|
|
@ -53,6 +58,8 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
bool no_change_propagation = false;
|
||||
|
||||
void _emit_theme_changed();
|
||||
|
||||
HashMap<StringName, HashMap<StringName, Ref<Texture2D>>> icon_map;
|
||||
|
|
@ -96,6 +103,9 @@ protected:
|
|||
|
||||
static void _bind_methods();
|
||||
|
||||
void _freeze_change_propagation();
|
||||
void _unfreeze_and_propagate_changes();
|
||||
|
||||
virtual void reset_state() override;
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue