| 65 | } |
| 66 | |
| 67 | Widget::~Widget() { |
| 68 | if( !m_parent.lock() ) { |
| 69 | // If this widget is an orphan, we assume it is |
| 70 | // a root widget and try to de-register it. |
| 71 | std::vector<Widget*>::iterator iter( std::find( root_widgets.begin(), root_widgets.end(), this ) ); |
| 72 | |
| 73 | if( iter != root_widgets.end() ) { |
| 74 | root_widgets.erase( iter ); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | bool Widget::IsLocallyVisible() const { |
| 80 | return m_visible; |