Core: support to load old project files containing image planes

See forum: https://forum.freecad.org/viewtopic.php?p=670545#p670545
This commit is contained in:
wmayer
2023-03-24 23:25:48 +01:00
committed by wwmayer
parent cdb47d2f4f
commit a2579ebb92
7 changed files with 33 additions and 17 deletions

View File

@@ -201,7 +201,7 @@ void FileHandler::openImage()
QFileInfo fi;
fi.setFile(filename);
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "App::ImagePlane", fi.baseName().toStdString());
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "Image::ImagePlane", fi.baseName().toStdString());
Gui::cmdAppDocumentArgs(doc, "ActiveObject.ImageFile = '%s'", fi.absoluteFilePath().toStdString());
Gui::cmdAppDocumentArgs(doc, "ActiveObject.Label = '%s'", fi.baseName().toStdString());
Gui::cmdAppDocument(doc, "recompute()");