Commits

Yuya Nishihara committed 48ee73f

repoview: do not crash by setVisibleColumns even if model is not set

FileDiffDialog needs to sync columns visibility by notification signals. This
change makes it easy to.

  • Participants
  • Parent commits 1925ff7

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repoview.py

                 for visualindex in xrange(hh.count() - hh.hiddenSectionCount())]
 
     def setVisibleColumns(self, visiblecols):
-        if visiblecols == self.visibleColumns():
+        if not self.model() or visiblecols == self.visibleColumns():
             return
         hh = self.horizontalHeader()
         hh.sectionMoved.disconnect(self.columnsVisibilityChanged)