When resizing the gui like it is shown in the IPlugGUIResize example, attached controls are automatically deleted. So after resizing you have to attach all the controls again. But the values and default values stored in the controls are also lost during deletion. When attaching the controls again, the true parameter values don't match the values stored in the control (mValue / mDefaultValue) resulting in a strange behaviour in the gui. I solved it by adding the below code to the IControl constructor. Maybe it would be helpful to add this to the "wdl-ol" ?
Thanks.
Code:
IControl(IPlugBase* pPlug, IRECT pR, int paramIdx = -1, IChannelBlend blendMethod = IChannelBlend::kBlendNone)
: mPlug(pPlug), mRECT(pR), mTargetRECT(pR), mParamIdx(paramIdx), mValue(0.0), mDefaultValue(-1.0),
mBlend(blendMethod), mDirty(true), mHide(false), mGrayed(false), mDisablePrompt(true), mDblAsSingleClick(false),
mClampLo(0.0), mClampHi(1.0), mMOWhenGreyed(false), mTextEntryLength(DEFAULT_TEXT_ENTRY_LEN),
mValDisplayControl(0), mNameDisplayControl(0), mTooltip("")
{
if (paramIdx > -1) {
IParam *par = GetParam();
if (par) {
mValue = par->GetNormalized();
mDefaultValue = par->GetDefaultNormalized();
}
}
}