Merge pull request #15963 from Noshyaar/l

Fix ObjectDB Instances still exist
This commit is contained in:
Rémi Verschelde 2018-01-22 09:02:16 +01:00 committed by GitHub
commit 3c5d11d600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -420,7 +420,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
p.push_back((int)SHAPE_DELETE);
tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", p);
tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_DELETE]);
tool_containers[TOOLBAR_SHAPE]->add_change_receptor(memnew(VSeparator));
tool_containers[TOOLBAR_SHAPE]->add_child(memnew(VSeparator));
tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton);
tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true);
tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true);
@ -548,6 +548,10 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
preview->set_region(true);
}
AutotileEditor::~AutotileEditor() {
memdelete(helper);
}
void AutotileEditor::_bind_methods() {
ClassDB::bind_method("_on_autotile_selected", &AutotileEditor::_on_autotile_selected);

View file

@ -120,6 +120,7 @@ class AutotileEditor : public Control {
AutotileEditorHelper *helper;
AutotileEditor(EditorNode *p_editor);
~AutotileEditor();
protected:
static void _bind_methods();