Skip to content
Snippets Groups Projects
Commit 9fd93b0a authored by Jared Boone's avatar Jared Boone
Browse files

Remove redundant focus tracking code.

parent 6e0aa79d
No related branches found
No related tags found
No related merge requests found
...@@ -170,16 +170,6 @@ AISRecentEntriesView::AISRecentEntriesView( ...@@ -170,16 +170,6 @@ AISRecentEntriesView::AISRecentEntriesView(
flags.focusable = true; 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) { bool AISRecentEntriesView::on_encoder(const EncoderEvent event) {
advance(event); advance(event);
return true; return true;
...@@ -236,7 +226,7 @@ void AISRecentEntriesView::paint(Painter& painter) { ...@@ -236,7 +226,7 @@ void AISRecentEntriesView::paint(Painter& painter) {
for(auto p = start; p != end; p++) { for(auto p = start; p != end; p++) {
const auto& entry = *p; const auto& entry = *p;
const auto is_selected_key = (selected_key == entry.mmsi); 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(); target_rect.pos.y += target_rect.height();
} }
} }
......
...@@ -112,9 +112,6 @@ public: ...@@ -112,9 +112,6 @@ public:
void paint(Painter& painter) override; void paint(Painter& painter) override;
void on_focus() override;
void on_blur() override;
bool on_encoder(const EncoderEvent event) override; bool on_encoder(const EncoderEvent event) override;
private: private:
...@@ -124,8 +121,6 @@ private: ...@@ -124,8 +121,6 @@ private:
EntryKey selected_key; EntryKey selected_key;
const EntryKey invalid_key = 0xffffffff; const EntryKey invalid_key = 0xffffffff;
bool has_focus = false;
void advance(const int32_t amount); void advance(const int32_t amount);
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment