fixed selection on dropdownlist, now it re-posts selection message
@@ -77,8 +77,11 @@ impl<M: MessageData, C: Control<M, C>> Control<M, C> for DropdownList<M, C> {
}
}
}
- UiMessageData::DropdownList(msg) if message.destination() == self.handle() => match msg
+ UiMessageData::DropdownList(msg)
+ if message.destination() == self.handle()
+ && message.direction() == MessageDirection::ToWidget =>
{
+ match msg {
DropdownListMessage::Items(items) => {
ListViewMessage::items(
self.list_view,
@@ -99,9 +102,12 @@ impl<M: MessageData, C: Control<M, C>> Control<M, C> for DropdownList<M, C> {
MessageDirection::ToWidget,
selection,
));
+
+ ui.send_message(message.reverse());
+ }
+ }
}
}
- },
_ => {}
}
}
