mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 08:18:25 +02:00
[ui] support for appending multiple elements to a ListAttribute at once
This commit is contained in:
parent
9bc8eaeb1b
commit
f6ae3ae057
2 changed files with 14 additions and 5 deletions
|
@ -63,7 +63,11 @@ class Reconstruction(QObject):
|
|||
|
||||
@Slot(graph.Attribute, QJsonValue)
|
||||
def appendAttribute(self, attribute, value):
|
||||
self._undoStack.tryAndPush(commands.ListAttributeAppendCommand(self._graph, attribute, value.toObject()))
|
||||
if value.isArray():
|
||||
pyValue = value.toArray().toVariantList()
|
||||
else:
|
||||
pyValue = None if value.isNull() else value.toObject()
|
||||
self._undoStack.tryAndPush(commands.ListAttributeAppendCommand(self._graph, attribute, pyValue))
|
||||
|
||||
@Slot(graph.Attribute)
|
||||
def removeAttribute(self, attribute):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue