| 1935 | //----------------------------------------------------------------------------- |
| 1936 | |
| 1937 | GuiCanvas *GuiControl::getRoot() |
| 1938 | { |
| 1939 | GuiControl *root = NULL; |
| 1940 | GuiControl *parent = getParent(); |
| 1941 | while (parent) |
| 1942 | { |
| 1943 | root = parent; |
| 1944 | parent = parent->getParent(); |
| 1945 | } |
| 1946 | if (root) |
| 1947 | return dynamic_cast<GuiCanvas*>(root); |
| 1948 | else |
| 1949 | return NULL; |
| 1950 | } |
| 1951 | |
| 1952 | //----------------------------------------------------------------------------- |
| 1953 |
no test coverage detected