mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Fix crash when switching between material & plugin tab
This commit is contained in:
parent
03e1fc34b4
commit
7c5bfef318
1 changed files with 7 additions and 2 deletions
|
@ -157,8 +157,13 @@ class PackageList(ListModel):
|
||||||
return
|
return
|
||||||
|
|
||||||
for package_data in response_data["data"]:
|
for package_data in response_data["data"]:
|
||||||
package = PackageModel(package_data, parent = self)
|
try:
|
||||||
self.appendItem({"package": package}) # Add it to this list model.
|
package = PackageModel(package_data, parent = self)
|
||||||
|
self.appendItem({"package": package}) # Add it to this list model.
|
||||||
|
except RuntimeError:
|
||||||
|
# I've tried setting the ownership of this object to not qml, but unfortunately that didn't prevent
|
||||||
|
# the issue that the wrapped C++ object was deleted when it was still parsing the response
|
||||||
|
return
|
||||||
|
|
||||||
self._request_url = response_data["links"].get("next", "") # Use empty string to signify that there is no next page.
|
self._request_url = response_data["links"].get("next", "") # Use empty string to signify that there is no next page.
|
||||||
self.hasMoreChanged.emit()
|
self.hasMoreChanged.emit()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue