mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/statistics] Handle selection in box
Change-Id: Id48d4f2af324bd53e8137b66695632f97396a196
This commit is contained in:
@@ -20,15 +20,22 @@ View * BoxController::view() {
|
||||
|
||||
bool BoxController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Up) {
|
||||
m_view.selectAnyQuantile(false);
|
||||
app()->setFirstResponder(tabController());
|
||||
return true;
|
||||
}
|
||||
if (event == Ion::Events::Left || event == Ion::Events::Right) {
|
||||
int nextSelectedQuantile = event == Ion::Events::Left ? m_view.selectedQuantile()-1 : m_view.selectedQuantile()+1;
|
||||
return m_view.selectQuantile(nextSelectedQuantile);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void BoxController::didBecomeFirstResponder() {
|
||||
m_view.reload(NAN);
|
||||
m_view.selectAnyQuantile(true);
|
||||
m_view.reload(-1);
|
||||
}
|
||||
|
||||
bool BoxController::isEmpty() {
|
||||
if (m_data->totalSize() == 0) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user