Skip to content

Commit

Permalink
Show what.txt if airwindowspedia is missing (#103)
Browse files Browse the repository at this point in the history
HighImpact is missing. Chris will fix in the 'pedia for his next
push but I might as well recover a bit better.

Closes #102
  • Loading branch information
baconpaul authored May 10, 2024
1 parent 5b7bcae commit 5c49921
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src-juce/AWConsolidatedEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,16 @@ void AWConsolidatedAudioProcessorEditor::resizeDocArea()
docBodyEd->setVisible(true);
}
docString = AirwinRegistry::documentationStringFor(processor.curentProcessorIndex);
docHeader = docString.upToFirstOccurrenceOf("\n", false, false);
docString = docString.fromFirstOccurrenceOf("\n", false, false).trim();
if (docString.isEmpty())
{
docHeader = "# " + AirwinRegistry::registry[processor.curentProcessorIndex].whatText;
docString = "No documentation available.";
}
else
{
docHeader = docString.upToFirstOccurrenceOf("\n", false, false);
docString = docString.fromFirstOccurrenceOf("\n", false, false).trim();
}

auto r = docAreaRect;
auto tFont = lnf->lookupFont(documentationLabel);
Expand Down

0 comments on commit 5c49921

Please sign in to comment.