X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fcontainer.cpp;fp=source%2Fcontainer.cpp;h=a8c3133d0632238831c5b1692f29c2e9c32c3876;hp=64e3a9a7e296ce374819abddc035112a18948e53;hb=103ceeace366c6d80fce323438b31b9bbc167915;hpb=aa9b8db38efb9e97460c76e27cecc4d1591b23e5 diff --git a/source/container.cpp b/source/container.cpp index 64e3a9a..a8c3133 100644 --- a/source/container.cpp +++ b/source/container.cpp @@ -103,8 +103,7 @@ Widget *Container::find_descendant_at(int x, int y) const if(Container *cont = dynamic_cast(wdg)) { const Geometry &cgeom = wdg->get_geometry(); - Widget *wdg2 = cont->find_descendant_at(x-cgeom.x, y-cgeom.y); - if(wdg2) + if(Widget *wdg2 = cont->find_descendant_at(x-cgeom.x, y-cgeom.y)) return wdg2; } return wdg;