Robert, do you want me to handle these in my branch and then have you
merge it all at a later date?

On Fri, 2008-08-15 at 10:46 -0400, Leontyev, Sergey wrote:
> I submitted a fix for osgWidget 2 days ago, but I did not see it on
> the submission list. 
> 
> Maybe it got lost, so here it is again.
> 
>  
> 
> Thanks
> 
> Sergey
> 
>  
> 
> From: Leontyev, Sergey 
> Sent: Tuesday, August 12, 2008 5:38 PM
> To: '[email protected]'
> Subject: minor fixes for osgWidget
> 
> 
>  
> 
> Some minor bug fixes for osgWidget:
> 
> Jeremy Moles seemed to approve these fixes 
> 
>  
> 
> 1. In StyleManager
> 
>  
> 
> when applying styles to a Label element the code below runs in a
> infinite loop. 
> 
> The reason for this is that nothing increments the Reader "r" in the
> case when applying a style to label, 
> 
> so I advance the reader when no match was found.  
> 
> ( To replicate the error apply style to any label)
> 
>  
> 
> replaced this:
> 
>                 while(!r.eof()) if(_styles[style]->applyStyle(t, r))
> inc = true;
> 
>  
> 
> with this:
> 
>                 while(!r.eof()) 
> 
>                  {
> 
>                                 if(_styles[style]->applyStyle(t, r)) 
> 
>                                     inc = true;
> 
>                                 else
> 
> 
> r.advanceOverCurrentFieldOrBlock();
> 
>                  }             
> 
>  
> 
>  
> 
> I tested it and it works well for me, I did not find any problems with
> it.
> 
>  
> 
>  
> 
> 2.  Added style support for Canvas element, event though there is no
> styles to apply yet. 
> 
> It is usefull for someone who inherits from Canvas class to develop
> another element.
> 
>  If applyStyle(Canvas) does not exist
> 
> there is no way to apply style to the  element that inherited from
> Canvas element.
> 
>  
> 
> Added virtual 
> 
>      bool applyStyle(Canvas).
> 
>  
> 
> and in added call to apply style if the Object is of type Canvas: 
> 
> StyleManager::_applyStyleToObject(osg::Object* obj, const std::string&
> style) {
> 
> ...
> 
>  
> 
> else if(!std::string("Canvas").compare(c)) 
> 
> return _coerceAndApply<Canvas>(obj,style,c);
> 
>  
> 
> Works as expected.
> 
>  
> 
> Sergey Leontyev
> 
> 
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to