mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
prevent double grab focus action
This commit is contained in:
parent
574f9ad55a
commit
9843ed131c
1 changed files with 2 additions and 2 deletions
|
|
@ -38,10 +38,10 @@ impl Name {
|
||||||
// Actions
|
// Actions
|
||||||
|
|
||||||
/// Change visibility status
|
/// Change visibility status
|
||||||
/// * grab focus on `is_visible`
|
/// * grab focus on `is_visible` is `true`
|
||||||
pub fn set_visible(&self, is_visible: bool) {
|
pub fn set_visible(&self, is_visible: bool) {
|
||||||
self.entry.set_visible(is_visible);
|
self.entry.set_visible(is_visible);
|
||||||
if is_visible {
|
if is_visible && self.entry.focus_child().is_none() {
|
||||||
self.entry.grab_focus();
|
self.entry.grab_focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue