Virgil Dupras avatar Virgil Dupras committed 7ef9726

[#349 state:fixed] Moved split*() methods out of qt.print_.ItemPrintDatasource.

These methods didn't belong there, but rather in TablePrintDatasource. They
caused a crash when printing a tree view.

Comments (0)

Files changed (1)

qt/print_/item_view.py

         raise NotImplementedError()
     
     def splitCount(self, rowIndex):
-        return self.printViewModel.split_count_at_row(rowIndex)
+        raise NotImplementedError()
     
     def splitValues(self, rowIndex, splitIndex):
-        return self.printViewModel.split_values(rowIndex, splitIndex)
+        raise NotImplementedError()
     
     def data(self, rowIndex, colIndex, role):
         """Returns model data for the index at the *printable* (rowIndex, colIndex) cell."""
     def rowCount(self):
         return self.table.rowCount(QModelIndex())
     
+    def splitCount(self, rowIndex):
+        return self.printViewModel.split_count_at_row(rowIndex)
+    
+    def splitValues(self, rowIndex, splitIndex):
+        return self.printViewModel.split_values(rowIndex, splitIndex)
+    
     def data(self, rowIndex, colIndex, role):
         index = self.table.index(rowIndex, self.columns[colIndex].logical_index)
         return self.table.data(index, role)
     def rowCount(self):
         return len(self.rows)
     
+    def splitCount(self, rowIndex):
+        return 0
+    
+    def splitValues(self, rowIndex, splitIndex):
+        return None
+    
     def data(self, rowIndex, colIndex, role):
         index = self._getIndex(rowIndex, colIndex)
         return self.tree.data(index, role)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.