Merge pull request #34423 from Chaosus/fix_toggle_scripts3

Updates toggle scripts switch tooltip (if user changed the shortcut)
This commit is contained in:
Yuri Roubinsky 2019-12-18 12:10:03 +03:00 committed by GitHub
commit 5bc427a95e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1654,6 +1654,7 @@ void CodeTextEditor::show_toggle_scripts_button() {
void CodeTextEditor::update_toggle_scripts_button() {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_icon("Back", "EditorIcons") : get_icon("Forward", "EditorIcons"));
toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
}
CodeTextEditor::CodeTextEditor() {
@ -1700,7 +1701,6 @@ CodeTextEditor::CodeTextEditor() {
toggle_scripts_button = memnew(ToolButton);
toggle_scripts_button->connect("pressed", this, "_toggle_scripts_pressed");
status_bar->add_child(toggle_scripts_button);
toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
toggle_scripts_button->hide();
// Error