Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Exiting text entry when ShowControlBounds is true freezes GUI #121

Open
mgunyho opened this issue Aug 20, 2018 · 0 comments
Open

Exiting text entry when ShowControlBounds is true freezes GUI #121

mgunyho opened this issue Aug 20, 2018 · 0 comments

Comments

@mgunyho
Copy link

mgunyho commented Aug 20, 2018

Using the IKnobMultiControlText from the IPlugMultiTargets example and the following IPlug constructor (based on IPlugEffect):

  TRACE;

  GetParam(kGain)->InitDouble("Gain", 50., 0., 100.0, 0.01, "%");

  GetParam(kGain2)->InitDouble("Gain 2", 50., 0., 100.0, 0.01, "%");

  IGraphics* pGraphics = MakeGraphics(this, kWidth, kHeight);
  pGraphics->AttachPanelBackground(&COLOR_RED);

  IBitmap knob = pGraphics->LoadIBitmap(KNOB_ID, KNOB_FN, kKnobFrames);

  pGraphics->AttachControl(new IKnobMultiControl(this, kGainX, kGainY, kGain, &knob));

  IText text(24);
  pGraphics->AttachControl(new IKnobMultiControlText(this, IRECT(kGainX + 70, kGainY, kGainX + 50 + 70, kGainY + 70), kGain2, &knob, &text));

  pGraphics->ShowControlBounds(true);

  AttachGraphics(pGraphics);
  
  MakeDefaultPreset((char *) "-", kNumPrograms);

After editing the text entry field, all of the GUI stops being redrawn, except for the mTextRECT of the IKnobMultiControlText.

If I comment out the line pGraphics->ShowControlBounds(true), the problem goes away. This caused a real headache when trying to debug the position of the controls in my program and suddenly everything stopped working.

This happens on Windows with VST2, although I don't think it's platform-specific.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant