Skip to content

Commit

Permalink
[calligra] Notify when a spreadsheet canvas item needs to be redrawn.…
Browse files Browse the repository at this point in the history
… Contributes to JB#42697
  • Loading branch information
adenexter committed Nov 12, 2019
1 parent e510b11 commit f7a43d5
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions rpm/calligra-invalidate-cache.patch
@@ -1,12 +1,36 @@
From ade89d081f50bc4d7c8da63fd5da1f62c3e3e442 Mon Sep 17 00:00:00 2001
From 3bd0ee6215b699b1249d25e91da53026cb5c9420 Mon Sep 17 00:00:00 2001
From: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Date: Mon, 13 May 2019 03:24:40 -0400
Subject: [PATCH 2/2] Update the document cache when an image is reloaded.
Subject: [PATCH 01/12] Update the document cache when an image is reloaded.

---
sheets/part/CanvasItem.h | 5 +++--
words/part/KWCanvasItem.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sheets/part/CanvasItem.h b/sheets/part/CanvasItem.h
index 9497292..feebf02 100644
--- a/sheets/part/CanvasItem.h
+++ b/sheets/part/CanvasItem.h
@@ -121,6 +121,7 @@ public Q_SLOTS:
Q_SIGNALS:
/* virtual */ void documentSizeChanged(const QSize&);
void obscuredRangeChanged(const Calligra::Sheets::Sheet* sheet, const QSize&);
+ void canvasUpdated();

public:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* _ev);
@@ -170,8 +171,8 @@ public:
virtual void setVertScrollBarPos(qreal) {}
virtual void setHorizScrollBarPos(qreal) {}

- virtual void update() { QGraphicsWidget::update(); }
- virtual void update(const QRectF& rect) { QGraphicsWidget::update(rect); }
+ virtual void update() { QGraphicsWidget::update(); emit canvasUpdated(); }
+ virtual void update(const QRectF& rect) { QGraphicsWidget::update(rect); emit canvasUpdated(); }
virtual Qt::LayoutDirection layoutDirection() const { return QGraphicsWidget::layoutDirection(); }
virtual QRectF rect() const { return QGraphicsWidget::rect(); }
virtual QSizeF size() const { return QGraphicsWidget::size(); }
diff --git a/words/part/KWCanvasItem.cpp b/words/part/KWCanvasItem.cpp
index 18f5b40..0885708 100644
--- a/words/part/KWCanvasItem.cpp
Expand Down

0 comments on commit f7a43d5

Please sign in to comment.