kopia lustrzana https://github.com/jameshball/osci-render
Close visualiser settings when going from new to legacy visualiser
rodzic
2b7e51f1df
commit
ddba403e14
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -22,6 +22,7 @@ public:
|
|||
~VisualiserComponent() override;
|
||||
|
||||
std::function<void()> openSettings;
|
||||
std::function<void()> closeSettings;
|
||||
|
||||
void childChanged();
|
||||
void enableFullScreen();
|
||||
|
|
Ładowanie…
Reference in New Issue