From: <wel...@us...> - 2011-01-06 12:09:11
|
Revision: 6717 http://planeshift.svn.sourceforge.net/planeshift/?rev=6717&view=rev Author: weltall2 Date: 2011-01-06 12:09:02 +0000 (Thu, 06 Jan 2011) Log Message: ----------- fixed double drawing Modified Paths: -------------- trunk/src/common/paws/pawsmanager.cpp Modified: trunk/src/common/paws/pawsmanager.cpp =================================================================== --- trunk/src/common/paws/pawsmanager.cpp 2011-01-06 11:34:59 UTC (rev 6716) +++ trunk/src/common/paws/pawsmanager.cpp 2011-01-06 12:09:02 UTC (rev 6717) @@ -568,7 +568,10 @@ { pawsWidget* widget = 0; - widget = mainWidget->WidgetAt(data.x, data.y); + if(modalWidget != mainWidget) + widget = mainWidget->WidgetAt(data.x, data.y); + else + widget = mainWidget; if ( widget != NULL ) { @@ -781,7 +784,10 @@ } // Now everything else. - if ( modalWidget != NULL ) modalWidget->Draw(); + //NOTE: if the modal widget is the main widget we don't want to draw it + //else we would draw it's widgets again + //@TODO: check if we can avoid this by overloading the Draw() method in the main widget. + if(modalWidget != NULL && modalWidget != mainWidget) modalWidget->Draw(); graphics2D->SetClipRect( 0,0, graphics2D->GetWidth(), graphics2D->GetHeight()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |