diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 9460e766c..aaf36132b 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -93,7 +93,10 @@ MainWindow::MainWindow(QWidget *parent) : { /* get the percentage and mouse message, TODO: refactor ui_window_title() */ auto parts = title.split(" - "); - toolbar_label->setText(QString("%1 - %2").arg(parts[1],parts.last())); + if (parts.size() < 5) + toolbar_label->setText(parts[1]); + else + toolbar_label->setText(QString("%1 - %2").arg(parts[1], parts.last())); } #endif });