mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-10 07:36:52 +02:00
Update TaskManager when node is removed
This commit is contained in:
parent
6d83985b39
commit
34a90563c8
3 changed files with 66 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
from PySide2 import QtCore
|
||||
|
||||
import shiboken2
|
||||
|
||||
class QObjectListModel(QtCore.QAbstractListModel):
|
||||
"""
|
||||
|
@ -272,7 +272,7 @@ class QObjectListModel(QtCore.QAbstractListModel):
|
|||
|
||||
def _dereferenceItem(self, item):
|
||||
# Ask for object deletion if parented to the model
|
||||
if item.parent() == self:
|
||||
if shiboken2.isValid(item) and item.parent() == self:
|
||||
# delay deletion until the next event loop
|
||||
# This avoids warnings when the QML engine tries to evaluate (but should not)
|
||||
# an object that has already been deleted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue