mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added an assertion to Label to help catch some 'doh!' moments
This commit is contained in:
parent
49df6e2696
commit
47535718dc
1 changed files with 3 additions and 2 deletions
|
|
@ -131,16 +131,17 @@ void Label::setBorderSize (BorderSize<int> newBorder)
|
|||
//==============================================================================
|
||||
Component* Label::getAttachedComponent() const
|
||||
{
|
||||
return static_cast<Component*> (ownerComponent);
|
||||
return ownerComponent.get();
|
||||
}
|
||||
|
||||
void Label::attachToComponent (Component* owner, bool onLeft)
|
||||
{
|
||||
jassert (owner != this); // Not a great idea to try to attach it to itself!
|
||||
|
||||
if (ownerComponent != nullptr)
|
||||
ownerComponent->removeComponentListener (this);
|
||||
|
||||
ownerComponent = owner;
|
||||
|
||||
leftOfOwnerComp = onLeft;
|
||||
|
||||
if (ownerComponent != nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue