From a29be020f5a6e13a45379db5b99b2a94956c2f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 4 Oct 2016 10:20:19 +0200 Subject: [PATCH] [apps/graph] add a method in function expression view to mark a cell as dirty Change-Id: Iee820055f36f18a31af5bd69097557e9718c6425 --- apps/graph/list/function_cell.cpp | 5 +++++ apps/graph/list/function_cell.h | 1 + apps/graph/list/function_expression_view.h | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/graph/list/function_cell.cpp b/apps/graph/list/function_cell.cpp index 5d452b8f7..8777b1152 100644 --- a/apps/graph/list/function_cell.cpp +++ b/apps/graph/list/function_cell.cpp @@ -31,3 +31,8 @@ void FunctionCell::setHighlighted(bool highlight) { Graph::Function * FunctionCell::function() { return m_function; } + +void FunctionCell::reloadCell() { + //TODO: optimize for function_name_view (make it virtual) + markRectAsDirty(bounds()); +} diff --git a/apps/graph/list/function_cell.h b/apps/graph/list/function_cell.h index 579a581ee..a234ce88f 100644 --- a/apps/graph/list/function_cell.h +++ b/apps/graph/list/function_cell.h @@ -11,6 +11,7 @@ public: void setEven(bool even); void setHighlighted(bool highlight); Graph::Function * function(); + void reloadCell(); static constexpr KDColor k_evenLineBackgroundColor = KDColor(0xF9F9F9); static constexpr KDColor k_oddLineBackgroundColor = KDColor(0xEEEEF2); diff --git a/apps/graph/list/function_expression_view.h b/apps/graph/list/function_expression_view.h index 4fd549736..173773bd2 100644 --- a/apps/graph/list/function_expression_view.h +++ b/apps/graph/list/function_expression_view.h @@ -9,7 +9,6 @@ class FunctionCell; class FunctionExpressionView : public FunctionCell { public: FunctionExpressionView(); - void drawRect(KDContext * ctx, KDRect rect) const override; };