Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CURA-12190] Expand the circumstances under which we expect the C++ object to be gone. #974

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions UM/Settings/Models/SettingPropertyProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,16 @@ def _onPropertiesChanged(self, key: str, property_names: List[str]) -> None:
# logic to emit pyqtSignals is gone.
return

self._updateStackLevels()
if has_values_changed:
try:
try:
self._updateStackLevels()
if has_values_changed:
self.propertiesChanged.emit()
except RuntimeError:
# QtObject has been destroyed, no need to handle the signals anymore.
# This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite
# caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying
# logic to emit pyqtSignals is gone.
return
except RuntimeError:
# QtObject has been destroyed, no need to handle the signals anymore.
# This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite
# caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying
# logic to emit pyqtSignals is gone.
return

def _update(self, container = None):
if not self._stack or not self._watched_properties or not self._key:
Expand Down
Loading