I think that in PropertyPanel::clear() the repaint() call should be substituted with updatePropHolderLayout(), otherwise the scrollbars are not updated and remain visible even if the panel is now empty.
…And, if you are spending some time on this, could you please take into account the possibility of adding a function like
bool PropertyPanel::hasProperties() const
return propertyHolderComponent->getNumSections() > 0;
Thanks! Will get that sorted out!