From 65dcabda9c0d67ac6ce5c1133156ff5ce22036ab Mon Sep 17 00:00:00 2001 From: Anatoli Vladev Date: Mon, 14 Oct 2013 12:22:08 +0300 Subject: [PATCH] Unused imports removed + sort bug fix --- lib/FormParams.py | 4 ++-- lib/Layout.py | 8 ++------ lib/Structures.py | 3 --- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/FormParams.py b/lib/FormParams.py index 911092f..76f00fb 100644 --- a/lib/FormParams.py +++ b/lib/FormParams.py @@ -1,7 +1,7 @@ from _ast import List from PyQt4.QtCore import Qt, pyqtSignal -from PyQt4.QtGui import QDoubleSpinBox, QLabel, QWidget, QComboBox, QFont, QGroupBox, QTextEdit, QFrame, QCheckBox -from matplotlib.backends.qt4_editor.formlayout import QPushButton, QDialog, QGridLayout, QVBoxLayout, QHBoxLayout, QLineEdit +from PyQt4.QtGui import QDoubleSpinBox, QLabel, QWidget, QComboBox, QFont, QFrame, QCheckBox +from matplotlib.backends.qt4_editor.formlayout import QPushButton, QDialog, QGridLayout, QVBoxLayout, QHBoxLayout from lib.Utils import frange, Constants, add_triplet diff --git a/lib/Layout.py b/lib/Layout.py index fd9383e..8e64d0f 100644 --- a/lib/Layout.py +++ b/lib/Layout.py @@ -10,16 +10,12 @@ import csv from PyQt4.QtCore import Qt, pyqtSignal, QString, QAbstractTableModel, QVariant, QEvent -from PyQt4.QtGui import QWidget, QHBoxLayout, QVBoxLayout, QPushButton, QProgressBar, QGridLayout, QLabel, QCheckBox, QFileDialog, QMessageBox, QTabWidget, QLineEdit, QPalette, QSizePolicy, QColor, QTableWidget, QAbstractItemView, QMenu, QTableWidgetItem, QTableView, QAction, QGraphicsOpacityEffect +from PyQt4.QtGui import QWidget, QHBoxLayout, QVBoxLayout, QPushButton, QProgressBar, QGridLayout, QLabel, QCheckBox, QFileDialog, QMessageBox, QTabWidget, QLineEdit, QPalette, QSizePolicy, QColor, QTableWidget, QAbstractItemView, QMenu, QTableWidgetItem, QTableView, QAction import math import gc from matplotlib import rcParams from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure -from matplotlib.mlab import detrend_mean -import numpy -from scipy.signal.signaltools import detrend -from sympy.ntheory.partitions_ import npartitions from lib.Structures import Global, TaskRange from lib.Utils import Constants, TaskImporter, flip_phase_list, uc_variable_name from lib.FormParams import * @@ -1247,7 +1243,7 @@ def _on_tasks_list_updated(self): self.last_scroll_position = self.verticalScrollBar().sliderPosition() self.setModel(ResultsTableModel(Global.tasks())) - self.sortByColumn(self.last_sort_column, self.last_sort_column) + self.sortByColumn(self.last_sort_column, self.last_sort_order) self.resizeColumnsToContents() self.horizontalHeader().setStretchLastSection(True) self.selectRow(self.last_selected_row) diff --git a/lib/Structures.py b/lib/Structures.py index 72ca1c0..e6b1621 100644 --- a/lib/Structures.py +++ b/lib/Structures.py @@ -1,7 +1,4 @@ -from copy import copy import hashlib -from itertools import combinations -import md5 import marshal from numpy import random from PyQt4.QtCore import pyqtSignal, QObject, QThread