[meld/ui-next] chunkmap: Handle empty adjustment ranges



commit ff0725f5ae90c87885e5230fa99dd0ab96fa425d
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Apr 13 07:36:18 2019 +1000

    chunkmap: Handle empty adjustment ranges

 meld/chunkmap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/chunkmap.py b/meld/chunkmap.py
index 8cee564c..c4eb4031 100644
--- a/meld/chunkmap.py
+++ b/meld/chunkmap.py
@@ -108,7 +108,7 @@ class ChunkMap(Gtk.DrawingArea):
         raise NotImplementedError()
 
     def do_draw(self, context: cairo.Context) -> bool:
-        if not self.adjustment:
+        if not self.adjustment or self.adjustment.get_upper() <= 0:
             return False
 
         height = self.get_allocated_height()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]