mirror of
https://github.com/yokemura/Magical8bitPlug2.git
synced 2025-05-24 23:00:21 -04:00
Prevent from resizing in initialization process
This commit is contained in:
parent
1245490e52
commit
2b0da1a0b4
@ -25,6 +25,8 @@ Magical8bitPlug2AudioProcessorEditor::Magical8bitPlug2AudioProcessorEditor (Magi
|
|||||||
{
|
{
|
||||||
// Make sure that before the constructor has finished, you've set the
|
// Make sure that before the constructor has finished, you've set the
|
||||||
// editor's size to whatever you need it to be.
|
// editor's size to whatever you need it to be.
|
||||||
|
isComponentsReady = false;
|
||||||
|
|
||||||
applyLookAndFeel();
|
applyLookAndFeel();
|
||||||
|
|
||||||
basicCompo.reset (new BasicParamsComponent (p, *this));
|
basicCompo.reset (new BasicParamsComponent (p, *this));
|
||||||
@ -54,7 +56,7 @@ Magical8bitPlug2AudioProcessorEditor::Magical8bitPlug2AudioProcessorEditor (Magi
|
|||||||
(p.parameters.getParameter ("isVolumeSequenceEnabled_raw"))->addListener (this);
|
(p.parameters.getParameter ("isVolumeSequenceEnabled_raw"))->addListener (this);
|
||||||
(p.parameters.getParameter ("isDutySequenceEnabled_raw"))->addListener (this);
|
(p.parameters.getParameter ("isDutySequenceEnabled_raw"))->addListener (this);
|
||||||
|
|
||||||
|
isComponentsReady = true;
|
||||||
resizeWholePanel();
|
resizeWholePanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,6 +273,9 @@ void Magical8bitPlug2AudioProcessorEditor::resized()
|
|||||||
|
|
||||||
void Magical8bitPlug2AudioProcessorEditor::resizeWholePanel()
|
void Magical8bitPlug2AudioProcessorEditor::resizeWholePanel()
|
||||||
{
|
{
|
||||||
|
if (!isComponentsReady) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
bool isMono = (int)(*processor.settingRefs.maxPoly) == 1;
|
bool isMono = (int)(*processor.settingRefs.maxPoly) == 1;
|
||||||
setSize (sizes.totalWidth, sizes.totalHeight (processor.settingRefs.isAdvancedPanelOpen(), isMono));
|
setSize (sizes.totalWidth, sizes.totalHeight (processor.settingRefs.isAdvancedPanelOpen(), isMono));
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,8 @@ private:
|
|||||||
std::unique_ptr<BendParamsComponent> bendCompo;
|
std::unique_ptr<BendParamsComponent> bendCompo;
|
||||||
std::unique_ptr<SweepParamsComponent> sweepCompo;
|
std::unique_ptr<SweepParamsComponent> sweepCompo;
|
||||||
std::unique_ptr<VibratoParamsComponent> vibCompo;
|
std::unique_ptr<VibratoParamsComponent> vibCompo;
|
||||||
|
|
||||||
|
bool isComponentsReady;
|
||||||
|
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Magical8bitPlug2AudioProcessorEditor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Magical8bitPlug2AudioProcessorEditor)
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user