VViewContainer.cpp Is this mod safe?

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
yeahtuna
Posts: 28
Joined: Tue Jun 21, 2016 10:41 pm

VViewContainer.cpp Is this mod safe?

Post by yeahtuna »

I'm having an issue with parts of my UI not being drawn when maximizing and restoring a window. The fix I've come up with is below. Any idea if these changes to the drawRect method are going to get me into trouble?

Code: Select all

//DRAW THE VIEW EVEN IF IT DOESN"T INTERSECT THE PARENT VIEW'S BOUNDING BOX
if (1 == 1 || checkUpdateRect (pV, clientRect))
{
	CRect viewSize = pV->getViewSize (viewSize);
	viewSize.bound (newClip);
	
	//if (viewSize.getWidth () == 0 || viewSize.getHeight () == 0)
	//continue;
	
	pContext->setClipRect (viewSize);
	float globalContextAlpha = pContext->getGlobalAlpha ();
	pContext->setGlobalAlpha (globalContextAlpha * pV->getAlphaValue ());
	pV->drawRect (pContext, viewSize);
	pContext->setGlobalAlpha (globalContextAlpha);
}
	

yeahtuna
Posts: 28
Joined: Tue Jun 21, 2016 10:41 pm

Re: VViewContainer.cpp Is this mod safe?

Post by yeahtuna »

It results in views not being updated properly unless explicitly calling invalid() on them....

Post Reply