summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/registered-widget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index 7c643715f..185d1e3b4 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -55,6 +55,9 @@ public:
bool is_updating() {if (_wr) return _wr->isUpdating(); else return false;}
+ // provide automatic 'upcast' for ease of use. (do it 'dynamic_cast' instead of 'static' because who knows what W is)
+ operator const Gtk::Widget () { return dynamic_cast<Gtk::Widget*>(this); }
+
protected:
RegisteredWidget() : W() { construct(); }
template< typename A >