mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-23 05:56:36 +02:00
[ui] GraphEditor: add action to clear node internal data
This commit is contained in:
parent
b771352694
commit
5c179cce6e
2 changed files with 15 additions and 1 deletions
|
@ -831,6 +831,15 @@ class Node(BaseObject):
|
|||
return False
|
||||
return True
|
||||
|
||||
@Slot()
|
||||
def clearData(self):
|
||||
""" Delete this Node internal folder.
|
||||
Status will be reset to Status.NONE
|
||||
"""
|
||||
if os.path.exists(self.internalFolder):
|
||||
shutil.rmtree(self.internalFolder)
|
||||
self.updateStatusFromCache()
|
||||
|
||||
def isAlreadySubmitted(self):
|
||||
for chunk in self._chunks:
|
||||
if chunk.isAlreadySubmitted():
|
||||
|
|
|
@ -40,7 +40,12 @@ Item {
|
|||
}
|
||||
MenuSeparator {}
|
||||
MenuItem {
|
||||
text: "Delete"
|
||||
text: "Clear Data"
|
||||
enabled: !root.readOnly
|
||||
onTriggered: node.clearData()
|
||||
}
|
||||
MenuItem {
|
||||
text: "Delete Node"
|
||||
enabled: !root.readOnly
|
||||
onTriggered: _reconstruction.removeNode(node)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue