summaryrefslogtreecommitdiffstats
path: root/src/display/sp-canvas.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-11-19 05:23:04 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-11-19 05:23:04 +0000
commit969361993806dbe679d1065d5a869fbb74163e8e (patch)
tree96d9ad847f6f5236719f06a9964d7f4fca1b72dc /src/display/sp-canvas.cpp
parentMultiple fixes for the objects panel (diff)
downloadinkscape-969361993806dbe679d1065d5a869fbb74163e8e.tar.gz
inkscape-969361993806dbe679d1065d5a869fbb74163e8e.zip
Speedup filtering and panning
Diffstat (limited to 'src/display/sp-canvas.cpp')
-rw-r--r--src/display/sp-canvas.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 88fec767f..4bff9865a 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -2119,8 +2119,9 @@ int SPCanvas::paintRectInternal(PaintRectSetup const *setup, Geom::IntRect const
// Find the optimal buffer dimensions
int bw = this_rect.width();
int bh = this_rect.height();
+ // we dont want to stop the idle process if the area is empty
if ((bw < 1) || (bh < 1))
- return 0;
+ return 1;
if (bw * bh < setup->max_pixels) {
// We are small enough
@@ -2207,7 +2208,10 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1)
Geom::IntRect paint_rect(xx0, yy0, xx1, yy1);
Geom::OptIntRect area = paint_rect & canvas_rect;
- if (!area || area->hasZeroArea()) return false;
+ // we dont want to stop the idle process if the area is empty
+ if (!area || area->hasZeroArea()) {
+ return true;
+ }
paint_rect = *area;
PaintRectSetup setup;