fix: request redraw in selectable text and context menu
This commit is contained in:
parent
8a017a15ee
commit
030a7dbe02
3 changed files with 5 additions and 1 deletions
2
iced
2
iced
|
|
@ -1 +1 @@
|
||||||
Subproject commit f5aa5a6f8cc2db6e2adbbc140c310a5a4af2f8d2
|
Subproject commit 7918b2826ec8ad4f9e0032f6a21286bac431e482
|
||||||
|
|
@ -377,6 +377,7 @@ impl<'a, Message: Clone + 'static> Widget<Message, crate::Theme, Renderer> for S
|
||||||
crate::widget::text_context_menu::TextCtxAction::Copy => {}
|
crate::widget::text_context_menu::TextCtxAction::Copy => {}
|
||||||
crate::widget::text_context_menu::TextCtxAction::SelectAll => {
|
crate::widget::text_context_menu::TextCtxAction::SelectAll => {
|
||||||
self.inner.select_all(&mut tree.children[0]);
|
self.inner.select_all(&mut tree.children[0]);
|
||||||
|
shell.request_redraw();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -404,6 +404,7 @@ where
|
||||||
state.open = false;
|
state.open = false;
|
||||||
});
|
});
|
||||||
self.widget.set_context_menu_position(self.tree, None);
|
self.widget.set_context_menu_position(self.tree, None);
|
||||||
|
shell.request_redraw();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -450,6 +451,8 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.widget.set_context_menu_position(self.tree, None);
|
self.widget.set_context_menu_position(self.tree, None);
|
||||||
|
// The menu closes and the selection may have changed.
|
||||||
|
shell.request_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_open = self.menu.tree.inner.with_data(|state| state.open);
|
let is_open = self.menu.tree.inner.with_data(|state| state.open);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue