Fixed an issue with the focus button of the Mercurial diff dialog.

Mon, 27 Dec 2010 19:49:16 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Dec 2010 19:49:16 +0100
changeset 786
06290d4db8ab
parent 784
3893c2537fb4
child 788
5b1b59777460

Fixed an issue with the focus button of the Mercurial diff dialog.

Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py	Mon Dec 27 19:41:12 2010 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py	Mon Dec 27 19:49:16 2010 +0100
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo
+from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo, Qt
 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, \
     QTextCursor, QFileDialog, QLineEdit
 
@@ -174,6 +174,9 @@
             return
         
         self.buttonBox.button(QDialogButtonBox.Save).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
+        
         tc = self.contents.textCursor()
         tc.movePosition(QTextCursor.Start)
         self.contents.setTextCursor(tc)
@@ -344,4 +347,4 @@
             self.intercept = False
             evt.accept()
             return
-        QWidget.keyPressEvent(self, evt)
\ No newline at end of file
+        QWidget.keyPressEvent(self, evt)

eric ide

mercurial