diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-27 08:46:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 08:46:44 +0200 |
commit | fec5157df549f8146617d42cf50a053166df5bba (patch) | |
tree | 5658b6d0f6af09179efd766b3e118285a9f8ea00 /editor | |
parent | c8c9bcb451b32a9ba04abfd21cd6bf37dcdf4d72 (diff) | |
parent | 5adb94e72694fd4c4b80be85b3adf9a4a7d6c45b (diff) |
Merge pull request #9904 from Noshyaar/pr-off
PropertyEditor: display "Off" if property is false
Diffstat (limited to 'editor')
-rw-r--r-- | editor/property_editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c2af2445cc..71afa8ac79 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -2199,6 +2199,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p case Variant::BOOL: { p_item->set_checked(1, obj->get(p_name)); + p_item->set_text(1, obj->get(p_name) ? TTR("On") : TTR("Off")); } break; case Variant::REAL: case Variant::INT: { @@ -3141,7 +3142,7 @@ void PropertyEditor::update_tree() { case Variant::BOOL: { item->set_cell_mode(1, TreeItem::CELL_MODE_CHECK); - item->set_text(1, TTR("On")); + item->set_text(1, obj->get(p.name) ? TTR("On") : TTR("Off")); item->set_tooltip(1, obj->get(p.name) ? "True" : "False"); item->set_checked(1, obj->get(p.name)); if (show_type_icons) |