Changed some logic in the breakpoint- and watchpoint viewer in order to fix some performance issues inserting or deleting lines in files with breakpoints defined.

Sun, 01 Jul 2012 19:25:40 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 01 Jul 2012 19:25:40 +0200
changeset 1927
a0959cd5f923
parent 1926
474057fbefe0
child 1928
adde55ed4ce5

Changed some logic in the breakpoint- and watchpoint viewer in order to fix some performance issues inserting or deleting lines in files with breakpoints defined.

Debugger/BreakPointViewer.py file | annotate | diff | comparison | revisions
Debugger/WatchPointViewer.py file | annotate | diff | comparison | revisions
--- a/Debugger/BreakPointViewer.py	Sun Jul 01 12:50:37 2012 +0200
+++ b/Debugger/BreakPointViewer.py	Sun Jul 01 19:25:40 2012 +0200
@@ -64,17 +64,20 @@
         """
         self.__model = model
         
-        self.sortingModel = QSortFilterProxyModel()
-        self.sortingModel.setSourceModel(self.__model)
-        super().setModel(self.sortingModel)
+        # TODO: Remove these comments once proven ok in daily use
+##        self.sortingModel = QSortFilterProxyModel()
+##        self.sortingModel.setDynamicSortFilter(True)
+##        self.sortingModel.setSourceModel(self.__model)
+##        super().setModel(self.sortingModel)
+        super().setModel(self.__model)
         
-        header = self.header()
-        header.setSortIndicator(0, Qt.AscendingOrder)
-        header.setSortIndicatorShown(True)
-        header.setClickable(True)
-        
-        self.setSortingEnabled(True)
-        
+##        header = self.header()
+##        header.setSortIndicator(0, Qt.AscendingOrder)
+##        header.setSortIndicatorShown(True)
+##        header.setClickable(True)
+##        
+##        self.setSortingEnabled(True)
+##        
         self.__layoutDisplay()
         
     def __layoutDisplay(self):
@@ -104,7 +107,8 @@
         
         @param index index to be converted (QModelIndex)
         """
-        return self.sortingModel.mapToSource(index)
+##        return self.sortingModel.mapToSource(index)
+        return index
         
     def __fromSourceIndex(self, sindex):
         """
@@ -112,7 +116,8 @@
         
         @param sindex source index to be converted (QModelIndex)
         """
-        return self.sortingModel.mapFromSource(sindex)
+##        return self.sortingModel.mapFromSource(sindex)
+        return sindex
         
     def __setRowSelected(self, index, selected=True):
         """
--- a/Debugger/WatchPointViewer.py	Sun Jul 01 12:50:37 2012 +0200
+++ b/Debugger/WatchPointViewer.py	Sun Jul 01 19:25:40 2012 +0200
@@ -59,17 +59,19 @@
         """
         self.__model = model
         
-        self.sortingModel = QSortFilterProxyModel()
-        self.sortingModel.setSourceModel(self.__model)
-        super().setModel(self.sortingModel)
+        # TODO: Remove these comments once proven ok in daily use
+##        self.sortingModel = QSortFilterProxyModel()
+##        self.sortingModel.setSourceModel(self.__model)
+##        super().setModel(self.sortingModel)
+        super().setModel(self.__model)
         
-        header = self.header()
-        header.setSortIndicator(0, Qt.AscendingOrder)
-        header.setSortIndicatorShown(True)
-        header.setClickable(True)
-        
-        self.setSortingEnabled(True)
-        
+##        header = self.header()
+##        header.setSortIndicator(0, Qt.AscendingOrder)
+##        header.setSortIndicatorShown(True)
+##        header.setClickable(True)
+##        
+##        self.setSortingEnabled(True)
+##        
         self.__layoutDisplay()
         
     def __layoutDisplay(self):
@@ -99,7 +101,8 @@
         
         @param index index to be converted (QModelIndex)
         """
-        return self.sortingModel.mapToSource(index)
+##        return self.sortingModel.mapToSource(index)
+        return index
         
     def __fromSourceIndex(self, sindex):
         """
@@ -107,7 +110,8 @@
         
         @param sindex source index to be converted (QModelIndex)
         """
-        return self.sortingModel.mapFromSource(sindex)
+##        return self.sortingModel.mapFromSource(sindex)
+        return sindex
         
     def __setRowSelected(self, index, selected=True):
         """

eric ide

mercurial