Fixed loading recent files in main window.
--HG-- branch : develop
This commit is contained in:
parent
18e0f6750a
commit
7cabc7df18
|
@ -3636,13 +3636,12 @@ void MainWindow::CreateActions()
|
|||
{
|
||||
recentFileActs[i] = new QAction(this);
|
||||
recentFileActs[i]->setVisible(false);
|
||||
connect(recentFileActs[i], &QAction::triggered, [this]()
|
||||
connect(recentFileActs[i], &QAction::triggered, this, [this]()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
if (action)
|
||||
if (QAction *action = qobject_cast<QAction *>(sender()))
|
||||
{
|
||||
const QString filePath = action->data().toString();
|
||||
if (not filePath.isEmpty())
|
||||
if (not filePath.isEmpty())
|
||||
{
|
||||
LoadPattern(filePath);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user