提交 3f63c84d 编写于 作者: M Michael Pitidis

Prompt user when loading recent files

上级 f3477514
# INSTRUCTIONS
Since the Python Qt bindings are not currently installed on DICE
machines, we have prepared a binary suitable for execution with
[cxfreeze]. To run the program enter ./bin/labelme from the toplevel
folder of the application. This has been tested succesfully on
student.compute.
[cxfreeze]: http://cx-freeze.sourceforge.net/
<!-- vim: set ft=markdown tw=72: -->
......@@ -471,7 +471,7 @@ class MainWindow(QMainWindow, WindowMixin):
icon = newIcon('labels')
action = QAction(
icon, '&%d %s' % (i+1, QFileInfo(f).fileName()), self)
action.triggered.connect(partial(self.loadFile, f))
action.triggered.connect(partial(self.loadRecent, f))
menu.addAction(action)
def popLabelListMenu(self, point):
......@@ -725,6 +725,10 @@ class MainWindow(QMainWindow, WindowMixin):
## User Dialogs ##
def loadRecent(self, filename):
if self.mayContinue():
self.loadFile(filename)
def openFile(self, _value=False):
if not self.mayContinue():
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册