# HG changeset patch # User Dirk Olmes # Date 1411183530 -7200 # Node ID 369bc16e74410ee8e8f362ba7516f8d0e93fcc4b # Parent f48a0a3208151feaac5e19f72e043c2823632478 do not add a connection if cancel was pressed on the dialog diff -r f48a0a320815 -r 369bc16e7441 RemoteViewer/RemoteViewer.py --- a/RemoteViewer/RemoteViewer.py Sat Sep 20 05:18:05 2014 +0200 +++ b/RemoteViewer/RemoteViewer.py Sat Sep 20 05:25:30 2014 +0200 @@ -27,9 +27,10 @@ # TODO: make the window title a ctor argument dialog = ConnectionDialog() dialog.setWindowTitle('New Connection') - dialog.exec_() - connection = dialog.connection - self.settings.addConnection(connection) + success = dialog.exec_() + if success: + connection = dialog.connection + self.settings.addConnection(connection) @ExceptionSafeSlot('QModelIndex') def openConnection(self, index):