mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-22 21:46:28 +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 False
|
||||||
return True
|
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):
|
def isAlreadySubmitted(self):
|
||||||
for chunk in self._chunks:
|
for chunk in self._chunks:
|
||||||
if chunk.isAlreadySubmitted():
|
if chunk.isAlreadySubmitted():
|
||||||
|
|
|
@ -40,7 +40,12 @@ Item {
|
||||||
}
|
}
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Delete"
|
text: "Clear Data"
|
||||||
|
enabled: !root.readOnly
|
||||||
|
onTriggered: node.clearData()
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: "Delete Node"
|
||||||
enabled: !root.readOnly
|
enabled: !root.readOnly
|
||||||
onTriggered: _reconstruction.removeNode(node)
|
onTriggered: _reconstruction.removeNode(node)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue