Add a function to plugin get the main screen parent

- Fix a bug where the main screen button did not disappear when the plugin
  was deactivated.

(cherry picked from commit 98e7c1edba)
This commit is contained in:
George Marques 2016-09-16 15:02:01 -03:00 committed by Rémi Verschelde
parent e6d49fb54c
commit 6a0d47f34c
4 changed files with 15 additions and 1 deletions

View file

@ -3013,7 +3013,7 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) {
for(int i=0;i<singleton->main_editor_buttons.size();i++) {
if (p_editor->get_name()==singleton->main_editor_buttons[i]->get_name()) {
if (p_editor->get_name()==singleton->main_editor_buttons[i]->get_text()) {
memdelete( singleton->main_editor_buttons[i] );
singleton->main_editor_buttons.remove(i);