From 1adffbdf006b2a7fe83c61bd63262aecba7fb041 Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 16 Jan 2023 20:57:26 -0500 Subject: [PATCH] Modified Qt GUI recent ROM menu items to show the ROM base name following by a tab space and then the full path. This allows for the ROM file name to be in view in the event that the full path is excessively long. --- src/drivers/Qt/ConsoleWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/drivers/Qt/ConsoleWindow.cpp b/src/drivers/Qt/ConsoleWindow.cpp index e4236467..4045cd86 100644 --- a/src/drivers/Qt/ConsoleWindow.cpp +++ b/src/drivers/Qt/ConsoleWindow.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -4779,7 +4780,16 @@ void consoleMenuBar::keyReleaseEvent(QKeyEvent *event) consoleRecentRomAction::consoleRecentRomAction(QString desc, QWidget *parent) : QAction( desc, parent ) { + QString txt; + QFileInfo fi(desc); + path = desc.toStdString(); + + txt = fi.fileName(); + txt += QString("\t"); + txt += desc; + + setText( txt ); } //---------------------------------------------------------------------------- consoleRecentRomAction::~consoleRecentRomAction(void)