mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Oops. Slot names aren't unique. This is better anyway. (nw)
This commit is contained in:
parent
9ca45de8a6
commit
a22837583f
@ -339,7 +339,7 @@ void MainWindow::mountImage(bool changedTo)
|
||||
unmountAct->setEnabled(true);
|
||||
|
||||
// Set the mount name
|
||||
QMenu* parentMenuItem = menuBar()->findChild<QMenu*>(img->device().name());
|
||||
QMenu* parentMenuItem = dynamic_cast<QMenu*>(sender()->parent());
|
||||
QString baseString = parentMenuItem->title();
|
||||
baseString.truncate(baseString.lastIndexOf(QString(" : ")));
|
||||
const QString newTitle = baseString + QString(" : ") + QString(img->filename());
|
||||
@ -363,7 +363,7 @@ void MainWindow::unmountImage(bool changedTo)
|
||||
dynamic_cast<QAction*>(sender())->setEnabled(false);
|
||||
|
||||
// Set the mount name
|
||||
QMenu* parentMenuItem = menuBar()->findChild<QMenu*>(img->device().name());
|
||||
QMenu* parentMenuItem = dynamic_cast<QMenu*>(sender()->parent());
|
||||
QString baseString = parentMenuItem->title();
|
||||
baseString.truncate(baseString.lastIndexOf(QString(" : ")));
|
||||
const QString newTitle = baseString + QString(" : ") + QString("[empty slot]");
|
||||
|
Loading…
Reference in New Issue
Block a user