Skip to content

Commit

Permalink
Various headless mode fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Oct 6, 2023
1 parent 677b27e commit ee0f991
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Source/Processors/FileReader/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,11 @@ ScrubberInterface* FileReader::getScrubberInterface()
void FileReader::saveCustomParametersToXml (XmlElement* xml)
{
XmlElement* childNode = xml->createNewChildElement ("SCRUBBERINTERFACE");
childNode->setAttribute ("show", getScrubberInterface()->isVisible() ? "true" : "false");

if(headlessMode)
childNode->setAttribute ("show", "false");
else
childNode->setAttribute ("show", getScrubberInterface()->isVisible() ? "true" : "false");
}

void FileReader::loadCustomParametersFromXml (XmlElement* xml)
Expand Down
8 changes: 6 additions & 2 deletions Source/Processors/Merger/Merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ void Merger::setMergerSourceNode(GenericProcessor* sn)
{
sourceNodeA = sn;
activePath = 0;
MergerEditor* ed = (MergerEditor*)getEditor();
ed->switchSource(activePath, false);

if(!headlessMode)
{
MergerEditor* ed = (MergerEditor*)getEditor();
ed->switchSource(activePath, false);
}
}
else
{
Expand Down
8 changes: 4 additions & 4 deletions Source/Processors/ProcessorGraph/ProcessorGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ void ProcessorGraph::updateViews(GenericProcessor* processor, bool updateGraphVi
{
LOGD("Processor to view: ", processor->getName());

if (processor->isSplitter())
if (processor->isSplitter() && !isConsoleApp)
{
SplitterEditor* spEditor = (SplitterEditor*)processor->getEditor();
Splitter* spProc = (Splitter*)processor;
Expand Down Expand Up @@ -1406,10 +1406,10 @@ void ProcessorGraph::removeProcessor(GenericProcessor* processor)

checkForNewRootNodes(processor, false, false);

AccessClass::getGraphViewer()->removeNode(processor);

if (AccessClass::getEditorViewport() != nullptr) //headless mode
if (!isConsoleApp)
{
AccessClass::getGraphViewer()->removeNode(processor);

AccessClass::getEditorViewport()->removeEditor(processor->editor.get());

//// need this to prevent editors from remaining after starting acquisition
Expand Down

0 comments on commit ee0f991

Please sign in to comment.