Fix opening a layout file when current file is not empty.
This commit is contained in:
parent
39cdbd1c70
commit
55cc3a7d54
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user