summaryrefslogtreecommitdiff
path: root/editor/editor_plugin_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_plugin_settings.cpp')
-rw-r--r--editor/editor_plugin_settings.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 30027c0c34..09577e39e1 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -92,9 +92,9 @@ void EditorPluginSettings::update_plugins() {
cf.instance();
String path = "res://addons/" + plugins[i] + "/plugin.cfg";
- Error err = cf->load(path);
+ Error err2 = cf->load(path);
- if (err != OK) {
+ if (err2 != OK) {
WARN_PRINTS("Can't load plugin config: " + path);
} else if (!cf->has_section_key("plugin", "name")) {
WARN_PRINTS("Plugin misses plugin/name: " + path);
@@ -108,7 +108,7 @@ void EditorPluginSettings::update_plugins() {
WARN_PRINTS("Plugin misses plugin/script: " + path);
} else {
- String d = plugins[i];
+ String d2 = plugins[i];
String name = cf->get_value("plugin", "name");
String author = cf->get_value("plugin", "author");
String version = cf->get_value("plugin", "version");
@@ -118,7 +118,7 @@ void EditorPluginSettings::update_plugins() {
TreeItem *item = plugin_list->create_item(root);
item->set_text(0, name);
item->set_tooltip(0, "Name: " + name + "\nPath: " + path + "\nMain Script: " + script + "\nDescription: " + description);
- item->set_metadata(0, d);
+ item->set_metadata(0, d2);
item->set_text(1, version);
item->set_metadata(1, script);
item->set_text(2, author);
@@ -129,7 +129,7 @@ void EditorPluginSettings::update_plugins() {
item->set_editable(3, true);
item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin"));
- if (EditorNode::get_singleton()->is_addon_plugin_enabled(d)) {
+ if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) {
item->set_custom_color(3, get_color("success_color", "Editor"));
item->set_range(3, 1);
} else {
@@ -152,7 +152,7 @@ void EditorPluginSettings::_plugin_activity_changed() {
bool active = ti->get_range(3);
String name = ti->get_metadata(0);
- EditorNode::get_singleton()->set_addon_plugin_enabled(name, active);
+ EditorNode::get_singleton()->set_addon_plugin_enabled(name, active, true);
bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(name);