Skip to content

Commit

Permalink
RowComponent should get the right parent to be destroyed at the right…
Browse files Browse the repository at this point in the history
… time

JASP crashes when closing the workspace if a TextArea was open in an Analysis form.
  • Loading branch information
boutinb committed Dec 13, 2023
1 parent 023ab81 commit ce1eed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions QMLComponents/controls/jasplistcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ void JASPListControl::cleanUp()
control->cleanUp();
}

for (auto source : _sourceItems)
source->disconnectModels();

JASPControl::cleanUp();
}
catch (...) {}
Expand Down
1 change: 1 addition & 0 deletions QMLComponents/controls/rowcontrols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void RowControls::init(int row, const Term& key, bool isNew)
context->setContextProperty("rowValue", key.asQString());

_rowObject = qobject_cast<QQuickItem*>(_rowComponent->create(context));
_rowObject->setParent(_parentModel);
_context = context;

if (_rowObject) _setupControls();
Expand Down

0 comments on commit ce1eed4

Please sign in to comment.