Close visualiser settings when going from new to legacy visualiser

pull/251/head
James H Ball 2024-08-21 13:43:30 +01:00
rodzic 2b7e51f1df
commit ddba403e14
3 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -108,6 +108,10 @@ OscirenderAudioProcessorEditor::OscirenderAudioProcessorEditor(OscirenderAudioPr
visualiserSettingsWindow.toFront(true);
};
visualiser.closeSettings = [this] {
visualiserSettingsWindow.setVisible(false);
};
visualiserSettingsWindow.setResizable(false, false);
visualiserSettingsWindow.setUsingNativeTitleBar(true);
visualiserSettings.setLookAndFeel(&getLookAndFeel());

Wyświetl plik

@ -221,6 +221,9 @@ void VisualiserComponent::setVisualiserType(bool oldVisualiser) {
}
if (oldVisualiser) {
browser.reset();
if (closeSettings != nullptr) {
closeSettings();
}
} else {
initialiseBrowser();
}
@ -345,6 +348,7 @@ void VisualiserComponent::popoutWindow() {
auto visualiser = new VisualiserComponent(audioProcessor, settings, this, oldVisualiser);
visualiser->settings.setLookAndFeel(&getLookAndFeel());
visualiser->openSettings = openSettings;
visualiser->closeSettings = closeSettings;
child = visualiser;
childChanged();
popOutButton.setVisible(false);

Wyświetl plik

@ -22,6 +22,7 @@ public:
~VisualiserComponent() override;
std::function<void()> openSettings;
std::function<void()> closeSettings;
void childChanged();
void enableFullScreen();