From 77fd320f87a25738d0364dee46b5ef4e7ccd146c Mon Sep 17 00:00:00 2001 From: dgdekoning Date: Fri, 9 Aug 2019 11:25:16 +0200 Subject: [PATCH] Remove decorator method from class --- activity_browser/app/ui/tables/views.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/activity_browser/app/ui/tables/views.py b/activity_browser/app/ui/tables/views.py index 8da07d008..4c765814b 100644 --- a/activity_browser/app/ui/tables/views.py +++ b/activity_browser/app/ui/tables/views.py @@ -61,27 +61,6 @@ def get_max_height(self): def sizeHint(self): return QSize(self.width(), self.get_max_height()) - @classmethod - def decorated_sync(cls, sync): - """ Syncs the data from the dataframe into the table view. - - Uses either of the PandasModel classes depending if the class is - 'drag-enabled'. - """ - @wraps(sync) - def wrapper(self, *args, **kwargs): - sync(self, *args, **kwargs) - - self.model = self._select_model() - # See: http://doc.qt.io/qt-5/qsortfilterproxymodel.html#details - self.proxy_model = QSortFilterProxyModel() - self.proxy_model.setSourceModel(self.model) - self.proxy_model.setSortCaseSensitivity(Qt.CaseInsensitive) - self.setModel(self.proxy_model) - self._resize() - - return wrapper - def _select_model(self) -> QAbstractTableModel: """ Select which model to use for the proxy model. """