mirror of
https://github.com/ciromattia/kcc
synced 2026-10-11 20:12:33 +00:00
Last used path - Bugfix
This commit is contained in:
+6
-13
@@ -207,9 +207,9 @@ class Ui_KCC(object):
|
|||||||
QtGui.QMessageBox.critical(MainWindow, 'KCC Error', "Path cannot contain non-ASCII characters.",
|
QtGui.QMessageBox.critical(MainWindow, 'KCC Error', "Path cannot contain non-ASCII characters.",
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
return
|
return
|
||||||
self.lastPath = os.path.abspath(os.path.join(str(dname), os.pardir))
|
if str(dname) != "":
|
||||||
GUI.JobList.addItem(dname)
|
self.lastPath = os.path.abspath(os.path.join(str(dname), os.pardir))
|
||||||
self.clearEmptyJobs()
|
GUI.JobList.addItem(dname)
|
||||||
|
|
||||||
def selectFile(self):
|
def selectFile(self):
|
||||||
if self.needClean:
|
if self.needClean:
|
||||||
@@ -228,20 +228,13 @@ class Ui_KCC(object):
|
|||||||
QtGui.QMessageBox.critical(MainWindow, 'KCC Error', "Path cannot contain non-ASCII characters.",
|
QtGui.QMessageBox.critical(MainWindow, 'KCC Error', "Path cannot contain non-ASCII characters.",
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
return
|
return
|
||||||
self.lastPath = os.path.abspath(os.path.join(str(fname), os.pardir))
|
if str(fname) != "":
|
||||||
GUI.JobList.addItem(fname)
|
self.lastPath = os.path.abspath(os.path.join(str(fname), os.pardir))
|
||||||
self.clearEmptyJobs()
|
GUI.JobList.addItem(fname)
|
||||||
|
|
||||||
def clearJobs(self):
|
def clearJobs(self):
|
||||||
GUI.JobList.clear()
|
GUI.JobList.clear()
|
||||||
|
|
||||||
def clearEmptyJobs(self):
|
|
||||||
# Sometimes empty records appear. Dirty workaround.
|
|
||||||
for i in range(GUI.JobList.count()):
|
|
||||||
if str(GUI.JobList.item(i).text()) == '':
|
|
||||||
GUI.JobList.takeItem(i)
|
|
||||||
GUI.JobList.scrollToBottom()
|
|
||||||
|
|
||||||
def modeBasic(self):
|
def modeBasic(self):
|
||||||
self.currentMode = 1
|
self.currentMode = 1
|
||||||
MainWindow.setMinimumSize(QtCore.QSize(420, 270))
|
MainWindow.setMinimumSize(QtCore.QSize(420, 270))
|
||||||
|
|||||||
Reference in New Issue
Block a user