From 07446719a4b874cc098d3957d2a4299c22391a67 Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Sat, 15 Jan 2022 01:39:22 +0200 Subject: [PATCH] qt: fix non-win32 status message when no mouse --- src/qt/qt_mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 });