From 9fd93b0af6de505061c59bc30ce84206bb8ed6cd Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 14 Jan 2016 09:45:29 -0800 Subject: [PATCH] Remove redundant focus tracking code. --- firmware/application/ais_app.cpp | 12 +----------- firmware/application/ais_app.hpp | 5 ----- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/firmware/application/ais_app.cpp b/firmware/application/ais_app.cpp index e6b591fb7..e69c6a007 100644 --- a/firmware/application/ais_app.cpp +++ b/firmware/application/ais_app.cpp @@ -170,16 +170,6 @@ AISRecentEntriesView::AISRecentEntriesView( flags.focusable = true; } -void AISRecentEntriesView::on_focus() { - has_focus = true; - set_dirty(); -} - -void AISRecentEntriesView::on_blur() { - has_focus = false; - set_dirty(); -} - bool AISRecentEntriesView::on_encoder(const EncoderEvent event) { advance(event); return true; @@ -236,7 +226,7 @@ void AISRecentEntriesView::paint(Painter& painter) { for(auto p = start; p != end; p++) { const auto& entry = *p; const auto is_selected_key = (selected_key == entry.mmsi); - ais_list_item_draw(entry, target_rect, painter, s, (has_focus && is_selected_key)); + ais_list_item_draw(entry, target_rect, painter, s, (has_focus() && is_selected_key)); target_rect.pos.y += target_rect.height(); } } diff --git a/firmware/application/ais_app.hpp b/firmware/application/ais_app.hpp index 4c4159f3a..e40848e0f 100644 --- a/firmware/application/ais_app.hpp +++ b/firmware/application/ais_app.hpp @@ -112,9 +112,6 @@ public: void paint(Painter& painter) override; - void on_focus() override; - void on_blur() override; - bool on_encoder(const EncoderEvent event) override; private: @@ -124,8 +121,6 @@ private: EntryKey selected_key; const EntryKey invalid_key = 0xffffffff; - bool has_focus = false; - void advance(const int32_t amount); };