Skip to content

Commit e77f503

Browse files
committed
Moved Widget case to later.
1 parent faad642 commit e77f503

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/osgWidget/WindowManager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,6 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
318318
// to that Window.
319319
for(Intersections::iterator i = intr.begin(); i != intr.end(); i++) {
320320

321-
Widget* widget = dynamic_cast<Widget*>(i->drawable.get());
322-
if(!widget) continue;
323-
324321
Window* win = 0;
325322
const osg::NodePath& nodePath = i->nodePath;
326323
for(osg::NodePath::const_reverse_iterator np_itr = nodePath.rbegin(); np_itr != nodePath.rend(); ++np_itr)
@@ -345,6 +342,8 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
345342
// If we've found a new Widnow, break out!
346343
else if(activeWin != win) break;
347344

345+
Widget* widget = dynamic_cast<Widget*>(i->drawable.get());
346+
if(!widget) continue;
348347

349348
// We need to return a list of every Widget that was picked, so
350349
// that the handler can operate on it accordingly.

0 commit comments

Comments
 (0)