diff --git a/firmware/common/ui_focus.cpp b/firmware/common/ui_focus.cpp index c1d0ed12..08310039 100644 --- a/firmware/common/ui_focus.cpp +++ b/firmware/common/ui_focus.cpp @@ -49,9 +49,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) { // return; // } if( !new_focus_widget->focusable() ) { - // New widget is not focusable. Does it have a preferred child that - // can receive focus? - set_focus_widget(new_focus_widget->last_child_focus()); return; } } @@ -67,7 +64,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) { if( focus_widget() ) { focus_widget()->on_focus(); focus_widget()->set_dirty(); - focus_widget()->parent()->set_last_child_focus(focus_widget()); } } diff --git a/firmware/common/ui_widget.cpp b/firmware/common/ui_widget.cpp index f4adf279..8125c30e 100644 --- a/firmware/common/ui_widget.cpp +++ b/firmware/common/ui_widget.cpp @@ -138,15 +138,6 @@ bool Widget::has_focus() { return (context().focus_manager().focus_widget() == this); } -Widget* Widget::last_child_focus() const { - return nullptr; -} - -void Widget::set_last_child_focus(Widget* const child) { - // Ignore. - (void)child; -} - bool Widget::on_key(const KeyEvent event) { (void)event; return false; diff --git a/firmware/common/ui_widget.hpp b/firmware/common/ui_widget.hpp index a752ffcf..bf53ffd5 100644 --- a/firmware/common/ui_widget.hpp +++ b/firmware/common/ui_widget.hpp @@ -85,8 +85,6 @@ public: bool focusable() const; void set_focusable(const bool value); bool has_focus(); - virtual Widget* last_child_focus() const; - virtual void set_last_child_focus(Widget* const child); virtual void paint(Painter& painter) = 0;