summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties.cpp8
-rw-r--r--editor/editor_properties.h2
2 files changed, 4 insertions, 6 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index d1380e928a..cb7fffe592 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2268,7 +2268,7 @@ void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step,
}
}
-EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {
+EditorPropertyTransform2D::EditorPropertyTransform2D() {
GridContainer *g = memnew(GridContainer);
g->set_columns(2);
add_child(g);
@@ -2278,9 +2278,7 @@ EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
spin[i]->set_flat(true);
- if (p_include_origin || i < 4) {
- g->add_child(spin[i]);
- }
+ g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed), varray(desc[i]));
@@ -3287,7 +3285,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
} break;
case Variant::TRANSFORM2D: {
- EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D(p_usage != PROPERTY_USAGE_EDITOR));
+ EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D);
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
return editor;
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index b4b9dc4c46..0cb21bb391 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -531,7 +531,7 @@ protected:
public:
virtual void update_property() override;
void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
- EditorPropertyTransform2D(bool p_include_origin = true);
+ EditorPropertyTransform2D();
};
class EditorPropertyBasis : public EditorProperty {