Fix opening a layout file when current file is not empty.

This commit is contained in:
Roman Telezhynskyi 2024-04-11 20:17:06 +03:00
parent 39cdbd1c70
commit 55cc3a7d54

View File

@ -687,7 +687,14 @@ void VPMainWindow::SetupMenu()
const QString filePath = senderAction->data().toString(); const QString filePath = senderAction->data().toString();
if (not filePath.isEmpty()) if (not filePath.isEmpty())
{ {
LoadFile(filePath); if (curFile.isEmpty() && !this->isWindowModified())
{
VPApplication::VApp()->MainWindow()->LoadFile(filePath);
}
else
{
VPApplication::VApp()->NewMainWindow()->LoadFile(filePath);
}
} }
} }
}); });