Page 1 of 1

VViewContainer.cpp Is this mod safe?

Posted: Tue Jul 12, 2016 11:44 pm
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);
}
	

Re: VViewContainer.cpp Is this mod safe?

Posted: Wed Jul 20, 2016 12:30 pm
by yeahtuna
It results in views not being updated properly unless explicitly calling invalid() on them....