| 1920 | //----------------------------------------------------------------------------- |
| 1921 | |
| 1922 | GuiCanvas *GuiControl::getRoot() |
| 1923 | { |
| 1924 | GuiControl *root = NULL; |
| 1925 | GuiControl *parent = getParent(); |
| 1926 | while (parent) |
| 1927 | { |
| 1928 | root = parent; |
| 1929 | parent = parent->getParent(); |
| 1930 | } |
| 1931 | if (root) |
| 1932 | return dynamic_cast<GuiCanvas*>(root); |
| 1933 | else |
| 1934 | return NULL; |
| 1935 | } |
| 1936 | |
| 1937 | //----------------------------------------------------------------------------- |
| 1938 |
no test coverage detected