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.

This commit is contained in:
harry 2023-01-16 20:57:26 -05:00
parent 38089b62c0
commit 1adffbdf00
1 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,7 @@
#include <QWindow>
#include <QScreen>
#include <QHeaderView>
#include <QFileInfo>
#include <QFileDialog>
#include <QMessageBox>
#include <QInputDialog>
@ -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)