Skip to content

Commit

Permalink
Small fix for click order to match draw order
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Lovegrove <stevenlovegrove@gmail.com>
  • Loading branch information
stevenlovegrove committed Jul 19, 2012
1 parent 1ff529d commit f36cd8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pangolin/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,8 @@ namespace pangolin

View* FindChild(View& parent, int x, int y)
{
for( vector<View*>::const_iterator i = parent.views.begin(); i != parent.views.end(); ++i )
// Find in reverse order to mirror draw order
for( vector<View*>::const_reverse_iterator i = parent.views.rbegin(); i != parent.views.rend(); ++i )
if( (*i)->show && (*i)->vp.Contains(x,y) )
return (*i);
return 0;
Expand Down

0 comments on commit f36cd8f

Please sign in to comment.