[improvement] log can be opened from menu now (or focuses)
This commit is contained in:
parent
9036a9054e
commit
be32f4f61d
8
PyLoT.py
8
PyLoT.py
@ -505,6 +505,8 @@ class MainWindow(QMainWindow):
|
|||||||
"""Show either the documentation
|
"""Show either the documentation
|
||||||
homepage (internet connection available),
|
homepage (internet connection available),
|
||||||
or shipped documentation files.""")
|
or shipped documentation files.""")
|
||||||
|
logAction = self.createAction(self, "&Show Log", self.showLogWidget,
|
||||||
|
tip="""Display Log""")
|
||||||
|
|
||||||
# create button group for component selection
|
# create button group for component selection
|
||||||
|
|
||||||
@ -604,7 +606,7 @@ class MainWindow(QMainWindow):
|
|||||||
autoPickActions = (self.auto_pick, self.auto_pick_local, self.auto_pick_sge)
|
autoPickActions = (self.auto_pick, self.auto_pick_local, self.auto_pick_sge)
|
||||||
|
|
||||||
self.helpMenu = self.menuBar().addMenu('&Help')
|
self.helpMenu = self.menuBar().addMenu('&Help')
|
||||||
helpActions = (helpAction,)
|
helpActions = (helpAction,logAction)
|
||||||
|
|
||||||
fileToolActions = (self.newProjectAction,
|
fileToolActions = (self.newProjectAction,
|
||||||
self.openProjectAction, self.saveProjectAction,
|
self.openProjectAction, self.saveProjectAction,
|
||||||
@ -771,6 +773,10 @@ class MainWindow(QMainWindow):
|
|||||||
self.ref_event_button.setEnabled(False)
|
self.ref_event_button.setEnabled(False)
|
||||||
self.test_event_button.setEnabled(False)
|
self.test_event_button.setEnabled(False)
|
||||||
|
|
||||||
|
def showLogWidget(self):
|
||||||
|
self.logwidget.show()
|
||||||
|
self.logwidget.activateWindow()
|
||||||
|
|
||||||
def keyPressEvent(self, event):
|
def keyPressEvent(self, event):
|
||||||
if event.key() == QtCore.Qt.Key.Key_Control:
|
if event.key() == QtCore.Qt.Key.Key_Control:
|
||||||
self._ctrl = True
|
self._ctrl = True
|
||||||
|
@ -131,6 +131,7 @@ class LogWidget(QtWidgets.QWidget):
|
|||||||
def reset_error(self):
|
def reset_error(self):
|
||||||
# used to make sure that write errors is finished before raising new Message box etc.
|
# used to make sure that write errors is finished before raising new Message box etc.
|
||||||
self.current_active_error = False
|
self.current_active_error = False
|
||||||
|
self.stderr.append(60*'#' + '\n\n')
|
||||||
|
|
||||||
|
|
||||||
def getDataType(parent):
|
def getDataType(parent):
|
||||||
|
Loading…
Reference in New Issue
Block a user