mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Fix ScriptTextEditor encapsulation
This commit is contained in:
parent
9cda7f7333
commit
c89df816c1
5 changed files with 15 additions and 13 deletions
|
@ -987,11 +987,8 @@ Array ScriptEditor::_get_open_scripts() const {
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool ScriptEditor::toggle_scripts_panel(CodeTextEditor *p_editor) {
|
||||
bool ScriptEditor::toggle_scripts_panel() {
|
||||
list_split->set_visible(!list_split->is_visible());
|
||||
if (p_editor) {
|
||||
p_editor->update_toggle_scripts_button();
|
||||
}
|
||||
return list_split->is_visible();
|
||||
}
|
||||
|
||||
|
@ -1141,14 +1138,13 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||
} break;
|
||||
case TOGGLE_SCRIPTS_PANEL: {
|
||||
if (current) {
|
||||
CodeTextEditor *code_editor = NULL;
|
||||
ScriptTextEditor *editor = dynamic_cast<ScriptTextEditor *>(current);
|
||||
ScriptTextEditor *editor = Object::cast_to<ScriptTextEditor>(current);
|
||||
toggle_scripts_panel();
|
||||
if (editor) {
|
||||
code_editor = editor->code_editor;
|
||||
editor->update_toggle_scripts_button();
|
||||
}
|
||||
toggle_scripts_panel(code_editor);
|
||||
} else {
|
||||
toggle_scripts_panel(NULL);
|
||||
toggle_scripts_panel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue