|
|
|
@@ -197,7 +197,7 @@ PropertyPanel::~PropertyPanel() |
|
|
|
//==============================================================================
|
|
|
|
void PropertyPanel::paint (Graphics& g)
|
|
|
|
{
|
|
|
|
if (propertyHolderComponent->getNumSections() == 0)
|
|
|
|
if (isEmpty())
|
|
|
|
{
|
|
|
|
g.setColour (Colours::black.withAlpha (0.5f));
|
|
|
|
g.setFont (14.0f);
|
|
|
|
@@ -215,16 +215,21 @@ void PropertyPanel::resized() |
|
|
|
//==============================================================================
|
|
|
|
void PropertyPanel::clear()
|
|
|
|
{
|
|
|
|
if (propertyHolderComponent->getNumSections() > 0)
|
|
|
|
if (! isEmpty())
|
|
|
|
{
|
|
|
|
propertyHolderComponent->clear();
|
|
|
|
repaint();
|
|
|
|
updatePropHolderLayout();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool PropertyPanel::isEmpty() const
|
|
|
|
{
|
|
|
|
return propertyHolderComponent->getNumSections() == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PropertyPanel::addProperties (const Array <PropertyComponent*>& newProperties)
|
|
|
|
{
|
|
|
|
if (propertyHolderComponent->getNumSections() == 0)
|
|
|
|
if (isEmpty())
|
|
|
|
repaint();
|
|
|
|
|
|
|
|
propertyHolderComponent->addSection (new SectionComponent (String::empty, newProperties, true));
|
|
|
|
@@ -237,7 +242,7 @@ void PropertyPanel::addSection (const String& sectionTitle, |
|
|
|
{
|
|
|
|
jassert (sectionTitle.isNotEmpty());
|
|
|
|
|
|
|
|
if (propertyHolderComponent->getNumSections() == 0)
|
|
|
|
if (isEmpty())
|
|
|
|
repaint();
|
|
|
|
|
|
|
|
propertyHolderComponent->addSection (new SectionComponent (sectionTitle, newProperties, shouldBeOpen));
|
|
|
|
|