[meld] linkmap: Reduce the reliance on keeping the FileDiff reference around



commit e7896c3c562b08638ad35d7eef19451bbb07940a
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Nov 18 06:03:17 2017 +1000

    linkmap: Reduce the reliance on keeping the FileDiff reference around

 meld/linkmap.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/meld/linkmap.py b/meld/linkmap.py
index 8931e73..5653f4b 100644
--- a/meld/linkmap.py
+++ b/meld/linkmap.py
@@ -34,6 +34,7 @@ class LinkMap(Gtk.DrawingArea):
 
     def __init__(self):
         self.filediff = None
+        self.views = []
         meldsettings.connect('changed', self.on_setting_changed)
 
     def associate(self, filediff, left_view, right_view):
@@ -50,7 +51,7 @@ class LinkMap(Gtk.DrawingArea):
             self.fill_colors, self.line_colors = get_common_theme()
 
     def do_draw(self, context):
-        if not self.filediff:
+        if not self.views:
             return
 
         pix_start = [t.get_visible_rect().y for t in self.views]


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