[BUG] when a propertyPanel’s width less than a value, it’ll hit the jassert

This problem is exactly the same as:

Hi loopfine,

Just checked this out and I got to this width in the demo before I hit the assertion:

This seems pretty reasonable. If you want to avoid hitting this assertion then perhaps use a ComponentBoundsConstrainer to disallow the user from making the width this small.

Ed

Thanks for your reply, ed95.

I think to limit its width is not a good idea for some situation. for example: when the propertyPanel is inside a stretchable layout and allow user to stretch its width to zero (or 1, 2px, etc.) for maximize other view area.

In that situation it would be best to remove the PropertyPanel when it reaches a certain minimum width.

Ed

That’s a way I’m considering about if this bug cannot be solved easily :slight_smile:

However, no need to remove it, just:

void MySetupPanel::resized()
{
    propertyPanel->setVisible (getWidth() > 90);
    propertyPanel->setBounds (getLocalBounds());
}

Thanks anyway…