diff --git a/doc/src/Howto_lammps_gui.rst b/doc/src/Howto_lammps_gui.rst index 0b5c4f509e..079df6bf4c 100644 --- a/doc/src/Howto_lammps_gui.rst +++ b/doc/src/Howto_lammps_gui.rst @@ -284,7 +284,8 @@ warnings or errors in the LAMMPS output, they are highlighted by using bold text colored in red. There is a small panel at the bottom center of the *Output* window showing how many warnings and errors were detected and how many lines the entire output has. By clicking on the -button on the right with the warning symbol, you can jump to the next +button on the right with the warning symbol or by using the keyboard +shortcut `Ctrl-N` (`Command-N` on macOS), you can jump to the next line with a warning or error. By default, the *Output* window is replaced each time a run is started. diff --git a/tools/lammps-gui/logwindow.cpp b/tools/lammps-gui/logwindow.cpp index 5d27ad1419..ee92e6da8b 100644 --- a/tools/lammps-gui/logwindow.cpp +++ b/tools/lammps-gui/logwindow.cpp @@ -79,6 +79,8 @@ LogWindow::LogWindow(const QString &_filename, QWidget *parent) : connect(action, &QShortcut::activated, this, &LogWindow::extract_yaml); action = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q), this); connect(action, &QShortcut::activated, this, &LogWindow::quit); + action = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_N), this); + connect(action, &QShortcut::activated, this, &LogWindow::next_warning); action = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Slash), this); connect(action, &QShortcut::activated, this, &LogWindow::stop_run); @@ -213,9 +215,16 @@ void LogWindow::contextMenuEvent(QContextMenuEvent *event) action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Y)); connect(action, &QAction::triggered, this, &LogWindow::extract_yaml); } + action = menu->addAction("&Jump to next warning or error", this, &LogWindow::next_warning); + action->setIcon(QIcon(":/icons/warning.png")); + action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N)); + menu->addSeparator(); action = menu->addAction("&Close Window", this, &QWidget::close); action->setIcon(QIcon(":/icons/window-close.png")); action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_W)); + action = menu->addAction("&Quit LAMMPS-GUI", this, &LogWindow::quit); + action->setIcon(QIcon(":/icons/application-exit.png")); + action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q)); menu->exec(event->globalPos()); delete menu; }