don't make 'tree_view_node_label' manditory

there is no need to have this manditory (It had no effect anyway if it
was no selectable widget).

This removes the need for a previously used workaround which is adding a
dummy invisible widget with that id.
This commit is contained in:
gfgtdf 2015-06-21 21:47:00 +02:00
parent cbd0838b3d
commit fc6bbe0f75

View file

@ -73,12 +73,12 @@ ttree_view_node::ttree_view_node(
twidget::tvisible::visible);
}
twidget& widget = find_widget<twidget>(
&grid_, "tree_view_node_label", false);
twidget* widget = find_widget<twidget>(
&grid_, "tree_view_node_label", false, false);
label_ = dynamic_cast<tselectable_*>(&widget);
label_ = dynamic_cast<tselectable_*>(widget);
if(label_) {
widget.connect_signal<event::LEFT_BUTTON_CLICK>(
widget->connect_signal<event::LEFT_BUTTON_CLICK>(
boost::bind(
&ttree_view_node::
signal_handler_label_left_button_click,
@ -87,7 +87,7 @@ ttree_view_node::ttree_view_node(
_3,
_4),
event::tdispatcher::front_child);
widget.connect_signal<event::LEFT_BUTTON_CLICK>(
widget->connect_signal<event::LEFT_BUTTON_CLICK>(
boost::bind(
&ttree_view_node::
signal_handler_label_left_button_click,