Fixed mouse clicking on disabled context menu items.
This commit is contained in:
parent
11a2b0f88d
commit
98fa99ae42
1 changed files with 4 additions and 2 deletions
|
|
@ -59,9 +59,11 @@ rpl::producer<CallbackData> ItemBase::clicks() const {
|
||||||
return rpl::merge(
|
return rpl::merge(
|
||||||
AbstractButton::clicks() | rpl::to_empty,
|
AbstractButton::clicks() | rpl::to_empty,
|
||||||
_clicks.events()
|
_clicks.events()
|
||||||
) | rpl::map([=]() -> CallbackData {
|
) | rpl::filter([=] {
|
||||||
|
return isEnabled();
|
||||||
|
}) | rpl::map([=]() -> CallbackData {
|
||||||
return { action(), y(), _lastTriggeredSource, _index, true };
|
return { action(), y(), _lastTriggeredSource, _index, true };
|
||||||
});;
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
rpl::producer<int> ItemBase::contentWidthValue() const {
|
rpl::producer<int> ItemBase::contentWidthValue() const {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue