Gui: Set status bit when restoring is initiated by the user from the UI
This commit is contained in:
committed by
abdullahtahiriyo
parent
6cb616aeb8
commit
793a70b0e2
@@ -595,7 +595,10 @@ void BrowserView::urlFilter(const QUrl & url)
|
||||
}
|
||||
// Gui::Command::doCommand(Gui::Command::Gui,"execfile('%s')",(const char*) fi.absoluteFilePath(). toLocal8Bit());
|
||||
QString filename = Base::Tools::escapeEncodeFilename(fi.absoluteFilePath());
|
||||
// Set flag indicating that this load/restore has been initiated by the user (not by a macro)
|
||||
Gui::Application::Instance->setStatus(Gui::Application::UserInitiatedOpenDocument, true);
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"with open('%s') as file:\n\texec(file.read())",(const char*) filename.toUtf8());
|
||||
Gui::Application::Instance->setStatus(Gui::Application::UserInitiatedOpenDocument, false);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
QMessageBox::critical(this, tr("Error"), QString::fromUtf8(e.what()));
|
||||
|
||||
Reference in New Issue
Block a user