From 7f7f80d7906ea113b48006a737a4a8aac503a48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 4 Apr 2017 18:29:05 +0200 Subject: [PATCH] [apps/shared] In curve view, change subviews order to avoid useless redrawing Change-Id: I49e6548ac2a72f33d3d78b95a8f248a498f7e74e --- apps/shared/curve_view.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/shared/curve_view.cpp b/apps/shared/curve_view.cpp index 86fb7b700..3921afd09 100644 --- a/apps/shared/curve_view.cpp +++ b/apps/shared/curve_view.cpp @@ -474,14 +474,11 @@ int CurveView::numberOfSubviews() const { View * CurveView::subviewAtIndex(int index) { assert(index >= 0 && index < 3); - if (index == 0 && m_bannerView != nullptr) { - return m_bannerView; - } - if (index == 0 && m_bannerView != nullptr) { - return m_bannerView; - } - if (index == 1 && m_okView != nullptr) { + if (index == 0 && m_okView != nullptr) { return m_okView; + } + if (index == 1 && m_bannerView != nullptr) { + return m_bannerView; } return m_cursorView; }