Skip to content

Commit

Permalink
Merge pull request #1397 from plugdata-team/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
timothyschoen authored Jan 17, 2024
2 parents 1a94ea9 + 025bd23 commit 23daa5a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ void PluginEditor::closeTab(Canvas* cnv)
auto patch = cnv->refCountedPatch;

sidebar->hideParameters();
sidebar->clearSearchOutliner();

patch->setVisible(false);

Expand Down
11 changes: 6 additions & 5 deletions Source/Sidebar/SearchPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,21 @@ class SearchPanel : public Component, public KeyListener, public Timer
{
return false;
}

void clear()
{
patchTree.clearValueTree();
}

void timerCallback() override
{
auto* cnv = editor->getCurrentCanvas();
if(currentCanvas.getComponent() != cnv || (cnv && cnv->needsSearchUpdate))
if(cnv && (currentCanvas.getComponent() != cnv || cnv->needsSearchUpdate))
{
currentCanvas = cnv;
currentCanvas->needsSearchUpdate = false;
updateResults();
}
if (!cnv) {
patchTree.clearValueTree();
stopTimer();
}
}

void visibilityChanged() override
Expand Down
5 changes: 5 additions & 0 deletions Source/Sidebar/Sidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,8 @@ void Sidebar::updateConsole(int numMessages, bool newWarning)

console->update();
}

void Sidebar::clearSearchOutliner()
{
searchPanel->clear();
}
2 changes: 2 additions & 0 deletions Source/Sidebar/Sidebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class Sidebar : public Component
void clearConsole();
void updateConsole(int numMessages, bool newWarning);

void clearSearchOutliner();

void updateAutomationParameters();

static constexpr int dragbarWidth = 6;
Expand Down

0 comments on commit 23daa5a

Please sign in to comment.