mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/probability] Avoid useless draw rect / layout in calculation page
Change-Id: Ibf9b3d5445128d0f202b4d095c6754284e7bd796
This commit is contained in:
@@ -175,7 +175,6 @@ bool CalculationController::handleEvent(Ion::Events::Event event) {
|
||||
if (m_highlightedSubviewIndex == 0) {
|
||||
m_contentView.imageTableView()->select(false);
|
||||
m_contentView.imageTableView()->setHighlight(false);
|
||||
m_contentView.layoutSubviews();
|
||||
} else {
|
||||
EditableTextCell * calculCell = m_contentView.calculationCellAtIndex(m_highlightedSubviewIndex-1);
|
||||
calculCell->setHighlighted(false);
|
||||
|
||||
@@ -80,6 +80,10 @@ void ImageTableView::didBecomeFirstResponder() {
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
void ImageTableView::willExitResponderChain(Responder * nextFirstResponder) {
|
||||
m_calculationController->reload();
|
||||
}
|
||||
|
||||
bool ImageTableView::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::OK) {
|
||||
m_calculationController->setCalculationAccordingToIndex(m_selectableTableView.selectedRow());
|
||||
|
||||
@@ -32,6 +32,7 @@ class ImageTableView : public View, public Responder, public SimpleListViewDataS
|
||||
void setCalculation(Calculation * calculation, int index);
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
void willExitResponderChain(Responder * nextFirstResponder) override;
|
||||
void select(bool select);
|
||||
void setHighlight(bool highlight);
|
||||
int numberOfRows() override;
|
||||
|
||||
Reference in New Issue
Block a user