Catch both Windows and Unix line endings; Clear the find when there is no text.
This commit is contained in:
parent
02cf9253e9
commit
ecbac157a9
@ -271,6 +271,9 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow):
|
|||||||
#else:
|
#else:
|
||||||
self.updateOutput.emit(output.strip('\r\n'))
|
self.updateOutput.emit(output.strip('\r\n'))
|
||||||
output = ''
|
output = ''
|
||||||
|
elif output.endswith('\n'):
|
||||||
|
self.updateOutput.emit(output.strip('\n'))
|
||||||
|
output = ''
|
||||||
|
|
||||||
def on_open_action_triggered(self):
|
def on_open_action_triggered(self):
|
||||||
self.connect_dialog.update_port_combobox()
|
self.connect_dialog.update_port_combobox()
|
||||||
@ -369,6 +372,12 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow):
|
|||||||
self.find_combobox.currentText(),
|
self.find_combobox.currentText(),
|
||||||
QtWebKit.QWebPage.HighlightAllOccurrences | QtWebKit.QWebPage.FindWrapsAroundDocument
|
QtWebKit.QWebPage.HighlightAllOccurrences | QtWebKit.QWebPage.FindWrapsAroundDocument
|
||||||
)
|
)
|
||||||
|
elif key == QtCore.Qt.Key_Escape:
|
||||||
|
if not self.find_combobox.currentText() and self.find_widget.isVisible():
|
||||||
|
self.find_action.setChecked(not self.find_action.isChecked())
|
||||||
|
else:
|
||||||
|
self.find_combobox.clearEditText()
|
||||||
|
self.output_browser.findText("")
|
||||||
|
|
||||||
def on_send_combobox_key_pressed(self, key):
|
def on_send_combobox_key_pressed(self, key):
|
||||||
if key == QtCore.Qt.Key_Return or key == QtCore.Qt.Key_Enter:
|
if key == QtCore.Qt.Key_Return or key == QtCore.Qt.Key_Enter:
|
||||||
|
Loading…
Reference in New Issue
Block a user