summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-02-12 23:29:04 +0100
committerGitHub <noreply@github.com>2017-02-12 23:29:04 +0100
commit37e75873ef88443a565d371ec638f554d92d4293 (patch)
tree6b906b3ced407abc9ff75760312cce21d0ba084c
parent3cab47adba089560ca0f76ba936967c7c8da5bd8 (diff)
parentb9c1d65d211ceac55df7f99e18f65da672d540d4 (diff)
Merge pull request #7789 from volzhs/update-script-button
Update attach/clear script tool bar icon in Scene panel
-rw-r--r--tools/editor/scene_tree_dock.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index ae7a80377d..f3e5fd85de 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -403,6 +403,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if(existing.is_valid()) {
const RefPtr empty;
selected->set_script(empty);
+ button_create_script->show();
+ button_clear_script->hide();
}
} break;
@@ -1252,6 +1254,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
return;
selected->set_script(p_script.get_ref_ptr());
editor->push_item(p_script.operator->());
+ button_create_script->hide();
+ button_clear_script->show();
}