Skip to content

Commit 1912392

Browse files
committed
[fix] fix column add
1 parent 60ea4be commit 1912392

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/data_calc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from PySide2.QtWidgets import QApplication, QMainWindow, QAction, QActionGroup, QFileDialog, QMessageBox, QLabel, QMdiArea, QMdiSubWindow, QTableWidget, QTableWidgetItem, QWidget
2-
from PySide2.QtCore import Signal, QFile, QStandardPaths, Qt, QTimer, QSignalBlocker
2+
from PySide2.QtCore import Signal, QFile, QCoreApplication, QStandardPaths, Qt, QTimer, QSignalBlocker
33
from PySide2.QtGui import QColor, QIcon, QPen, QPainter, QPalette, QPixmap, QFont, QFontDatabase
44
import PySide2.QtXml
55
from ui_data_calc import Ui_DataCalc
@@ -75,12 +75,12 @@ def addColumn(self):
7575
self.data.getDataframe().eval(i, inplace=True)
7676
self.operations.append(i)
7777
self.ui.custom.setText(str())
78-
self.ui.statusBar.showMessage(QCoreApplication.translate(
78+
self.ui.statusbar.showMessage(QCoreApplication.translate(
7979
"data_calc", "{} performed with success".format(i)))
8080
self.loadDataInTable()
8181
self.dataChanged.emit()
8282
except Exception as e:
83-
self.ui.statusBar.showMessage(str(e))
83+
self.ui.statusbar.showMessage(str(e))
8484
blocker.unblock()
8585
QApplication.restoreOverrideCursor()
8686

src/plot_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ def autoLabel(self):
134134

135135
def setKeys(self, keys):
136136
keys.sort()
137+
prev = (self.ui.plotKey.currentText(), self.ui.plotKeyX.currentText())
137138
self.ui.plotKey.clear()
138139
self.ui.plotKey.addItems(keys + ["None"])
139140
self.ui.plotKeyX.clear()
140141
self.ui.plotKeyX.addItems(["None"] + keys)
142+
self.ui.plotKey.setCurrentText(prev[0])
143+
self.ui.plotKeyX.setCurrentText(prev[1])

0 commit comments

Comments
 (0)