mirror of
https://github.com/godotengine/godot
synced 2024-09-05 11:48:29 +00:00
Fix CollisionShape2D editor crash
This commit is contained in:
parent
1becfea37c
commit
e5d0bb1605
|
@ -552,16 +552,6 @@ void CollisionShape2DEditor::edit(Node *p_node) {
|
||||||
_shape_changed();
|
_shape_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
CollisionShape2DEditor::CollisionShape2DEditor() {
|
|
||||||
node = nullptr;
|
|
||||||
canvas_item_editor = nullptr;
|
|
||||||
|
|
||||||
edit_handle = -1;
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
shape_type = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CollisionShape2DEditorPlugin::edit(Object *p_obj) {
|
void CollisionShape2DEditorPlugin::edit(Object *p_obj) {
|
||||||
collision_shape_2d_editor->edit(Object::cast_to<Node>(p_obj));
|
collision_shape_2d_editor->edit(Object::cast_to<Node>(p_obj));
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,9 @@ class CollisionShape2DEditor : public Control {
|
||||||
|
|
||||||
Vector<Point2> handles;
|
Vector<Point2> handles;
|
||||||
|
|
||||||
int shape_type;
|
int shape_type = -1;
|
||||||
int edit_handle;
|
int edit_handle = -1;
|
||||||
bool pressed;
|
bool pressed = false;
|
||||||
Variant original;
|
Variant original;
|
||||||
Transform2D original_transform;
|
Transform2D original_transform;
|
||||||
Vector2 original_point;
|
Vector2 original_point;
|
||||||
|
@ -90,8 +90,6 @@ public:
|
||||||
bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
|
bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
|
||||||
void forward_canvas_draw_over_viewport(Control *p_overlay);
|
void forward_canvas_draw_over_viewport(Control *p_overlay);
|
||||||
void edit(Node *p_node);
|
void edit(Node *p_node);
|
||||||
|
|
||||||
CollisionShape2DEditor();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CollisionShape2DEditorPlugin : public EditorPlugin {
|
class CollisionShape2DEditorPlugin : public EditorPlugin {
|
||||||
|
|
Loading…
Reference in a new issue