-Project settings can properly add/remove properties again, fixes #3177
This commit is contained in:
parent
027072728e
commit
eb7901c8b8
3 changed files with 9 additions and 2 deletions
|
@ -530,7 +530,7 @@ void ProjectSettings::_item_selected() {
|
|||
return;
|
||||
if (!ti->get_parent())
|
||||
return;
|
||||
category->set_text(ti->get_parent()->get_text(0));
|
||||
category->set_text(globals_editor->get_current_section());
|
||||
property->set_text(ti->get_text(0));
|
||||
popup_platform->set_disabled(false);
|
||||
|
||||
|
@ -569,7 +569,8 @@ void ProjectSettings::_item_add() {
|
|||
|
||||
String name = catname+"/"+propname;
|
||||
Globals::get_singleton()->set(name,value);
|
||||
globals_editor->get_property_editor()->update_tree();
|
||||
globals_editor->edit(NULL);
|
||||
globals_editor->edit(Globals::get_singleton());
|
||||
}
|
||||
|
||||
void ProjectSettings::_item_del() {
|
||||
|
|
|
@ -3812,6 +3812,11 @@ void SectionedPropertyEditor::_section_selected(int p_which) {
|
|||
filter->set_section( sections->get_item_metadata(p_which) );
|
||||
}
|
||||
|
||||
String SectionedPropertyEditor::get_current_section() const {
|
||||
|
||||
return sections->get_item_metadata( sections->get_current() );
|
||||
}
|
||||
|
||||
String SectionedPropertyEditor::get_full_item_path(const String& p_item) {
|
||||
|
||||
String base = sections->get_item_metadata( sections->get_current() );
|
||||
|
|
|
@ -270,6 +270,7 @@ public:
|
|||
PropertyEditor *get_property_editor();
|
||||
void edit(Object* p_object);
|
||||
String get_full_item_path(const String& p_item);
|
||||
String get_current_section() const;
|
||||
|
||||
SectionedPropertyEditor();
|
||||
~SectionedPropertyEditor();
|
||||
|
|
Loading…
Reference in a new issue