mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-03 03:30:06 +00:00
This commit is contained in:
parent
ebddf597b4
commit
b64bdda679
5 changed files with 49 additions and 12 deletions
|
|
@ -875,6 +875,11 @@ void Component::setBounds (int x, int y, int w, int h)
|
|||
const bool wasResized = (getWidth() != w || getHeight() != h);
|
||||
const bool wasMoved = (getX() != x || getY() != y);
|
||||
|
||||
#ifdef JUCE_DEBUG
|
||||
// It's a very bad idea to try to resize a component during its paint() method!
|
||||
jassert (! (flags.isInsidePaintCall && wasResized));
|
||||
#endif
|
||||
|
||||
if (wasMoved || wasResized)
|
||||
{
|
||||
if (flags.visibleFlag)
|
||||
|
|
@ -1680,6 +1685,10 @@ void Component::paintEntireComponent (Graphics& originalContext)
|
|||
{
|
||||
jassert (! originalContext.isClipEmpty());
|
||||
|
||||
#ifdef JUCE_DEBUG
|
||||
flags.isInsidePaintCall = true;
|
||||
#endif
|
||||
|
||||
Graphics* g = &originalContext;
|
||||
Image* effectImage = 0;
|
||||
|
||||
|
|
@ -1775,6 +1784,10 @@ void Component::paintEntireComponent (Graphics& originalContext)
|
|||
effect_->applyEffect (*effectImage, originalContext);
|
||||
delete effectImage;
|
||||
}
|
||||
|
||||
#ifdef JUCE_DEBUG
|
||||
flags.isInsidePaintCall = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue