@@ -38,7 +38,7 @@ QSharedPointer<ActionWatcher<QSharedPointer<const OperatorResult>>> OperatorActo
38
38
}
39
39
else if (pluginState.isEmpty ()) {
40
40
emit reportError (QString (
41
- " Plugin '%1' is in an invalid state and can't be excecuted . Double check the input fields." ).arg (
41
+ " Plugin '%1' is in an invalid state and can't be executed . Double check the input fields." ).arg (
42
42
op->getName ()));
43
43
}
44
44
return QSharedPointer<ActionWatcher<QSharedPointer<const OperatorResult>>>();
@@ -132,23 +132,23 @@ void OperatorActor::postProcess()
132
132
133
133
// Add output containers to container manager
134
134
if (result->getOutputContainers ().size () > 0 ) {
135
- if (m_outputName.isEmpty ()) {
136
- if (result->getPluginState ().contains (" container_name" )
137
- && result->getPluginState ().value (" container_name" ).isString ()) {
138
- m_outputName = result->getPluginState ().value (" container_name" ).toString ();
139
- }
140
- else {
141
- m_outputName = m_op->getName () + " Output" ;
142
- }
143
- }
144
135
int number = 1 ;
145
136
QModelIndex lastAdded;
146
137
for (QSharedPointer<BitContainer> output : result->getOutputContainers ()) {
138
+ QString containerName = m_outputName;
139
+ if (m_outputName.isEmpty ()) {
140
+ if (output->nameWasSet ()) {
141
+ containerName = output->name ();
142
+ }
143
+ else {
144
+ containerName = m_op->getName () + " Output" ;
145
+ }
146
+ }
147
147
if (result->getOutputContainers ().length () > 1 ) {
148
- output->setName (QString (" %2: %1" ).arg (m_outputName ).arg (number));
148
+ output->setName (QString (" %2: %1" ).arg (containerName ).arg (number));
149
149
}
150
150
else {
151
- output->setName (m_outputName );
151
+ output->setName (containerName );
152
152
}
153
153
number++;
154
154
lastAdded = m_bitContainerManager->getTreeModel ()->addContainer (output);
0 commit comments