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

develop
Roman Telezhynskyi 2024-04-11 20:17:06 +03:00
parent 39cdbd1c70
commit 55cc3a7d54
1 changed files with 8 additions and 1 deletions

View File

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