Open rainman110 opened 1 year ago
@bjoernTWK can you explain which problems occurred and which calculators were affected?
@bjoernTWK can you explain which problems occurred and which calculators were affected?
In my case the tasks are not copied in the new project (the folder was empty after the process -> maybe the external process element saving path is not applied correctly)
Bug Analysis
I have to withdraw my last analysis. The new path is known.
A multitude of problems come together here, I try to note them here:
Even if we fix this, only the active task group would be saved, as it is only part of the project. IMHO, all tasks need to be copied though, when saving a project to a different location.
@real-ct-ac What do you suggest here? How should we proceed.
The easiest way to "fix" it, is to simple copy the task files in "duplicateProject" via
gt::filesystem::copyDir(
QDir(oldDirectory.absoluteFilePath(QStringLiteral("tasks"))),
QDir(newDirectory.absoluteFilePath(QStringLiteral("tasks"))),
gt::filesystem::Recursive,
QRegularExpression(R"(.*\.gttask|index.json)"));
The copied files will be automatically read-in when the project is opened again. They won't be copied during clone-only though. It works, but I am not sure though, whether this is the correct way to do. @real-ct-ac Pinging you here ;)
One more thing. Only copying the task files does not work: What, if the tasks have been changed or extended.
Then, we need to
Thus, we need to make the processdata node copyable.
In GitLab by @bjoernTWK on Oct 23, 2023, 08:09
Summary
If a project is duplicated with the save-as-function (CTRL+SHIFT+S), the processes/calculators are not availabel in the new project (in one case GTlab crashed via the project)
Steps to reproduce