diff --git a/src/Mod/Start/Gui/StartView.cpp b/src/Mod/Start/Gui/StartView.cpp
index a4769da390..0967b052e8 100644
--- a/src/Mod/Start/Gui/StartView.cpp
+++ b/src/Mod/Start/Gui/StartView.cpp
@@ -49,6 +49,8 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
@@ -432,12 +434,10 @@ void StartView::postStart(PostStartBehavior behavior) const
void StartView::fileCardSelected(const QModelIndex& index)
{
- auto file = index.data(static_cast(Start::DisplayedFilesModelRoles::path)).toString();
- std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(file.toStdString().c_str());
- escapedstr = Base::Tools::escapeEncodeFilename(escapedstr);
- auto command = std::string("FreeCAD.loadFile('") + escapedstr + "')";
try {
- Base::Interpreter().runString(command.c_str());
+ auto filename =
+ index.data(static_cast(Start::DisplayedFilesModelRoles::path)).toString();
+ Gui::ModuleIO::verifyAndOpenFile(filename);
Gui::Application::checkForRecomputes();
postStart(PostStartBehavior::doNotSwitchWorkbench);
}