summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-18 11:00:41 +0200
committerGitHub <noreply@github.com>2022-06-18 11:00:41 +0200
commit94e962e27f0700a425654b40f219b34ade6cf531 (patch)
treed1904b75a478f3dc3e9976ed0f2a82d2b4c73ff5 /editor/plugins
parent3a2b409c5a62b2b7fbaae36f536abf6a798a4b9d (diff)
parente3fc0fd118db7463ca205e425c145f2a6a761527 (diff)
Merge pull request #62151 from tdaven/tdaven/fix-62149
Add missing new function parameter to fix button presses.
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_library_editor.cpp6
-rw-r--r--editor/plugins/animation_library_editor.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index ed908e413c..cae33edecb 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -419,12 +419,12 @@ void AnimationLibraryEditor::_item_renamed() {
}
}
-void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int p_button) {
+void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int p_id, MouseButton p_button) {
if (p_item->get_parent() == tree->get_root()) {
// Library
StringName lib_name = p_item->get_metadata(0);
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
- switch (p_button) {
+ switch (p_id) {
case LIB_BUTTON_ADD: {
add_library_dialog->set_title(TTR("Animation Name:"));
add_library_name->set_text("");
@@ -519,7 +519,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
Ref<Animation> anim = al->get_animation(anim_name);
ERR_FAIL_COND(!anim.is_valid());
- switch (p_button) {
+ switch (p_id) {
case ANIM_BUTTON_COPY: {
if (anim->get_name() == "") {
anim->set_name(anim_name); // Keep the name around
diff --git a/editor/plugins/animation_library_editor.h b/editor/plugins/animation_library_editor.h
index 5bd4e8d9e2..bf89508321 100644
--- a/editor/plugins/animation_library_editor.h
+++ b/editor/plugins/animation_library_editor.h
@@ -99,7 +99,7 @@ class AnimationLibraryEditor : public AcceptDialog {
void _load_file(String p_path);
void _item_renamed();
- void _button_pressed(TreeItem *p_item, int p_column, int p_button);
+ void _button_pressed(TreeItem *p_item, int p_column, int p_id, MouseButton p_button);
void _file_popup_selected(int p_id);