Skip to content

Commit

Permalink
Write full path for component libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbuahin committed Jul 27, 2019
1 parent 6a94590 commit 2db97c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gmodelcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ void GModelComponent::writeComponent(const QFileInfo &fileInfo)
// if(m_readFromFile)
// {
relPath = m_project->projectFile().dir().absoluteFilePath(libFile.filePath());
relPath = fileInfo.dir().relativeFilePath(relPath);
// relPath = fileInfo.dir().relativeFilePath(relPath);
// }
// else
// {
Expand All @@ -716,7 +716,8 @@ void GModelComponent::writeComponent(const QFileInfo &fileInfo)
}
else
{
relPath = fileInfo.dir().relativeFilePath(libFile.absoluteFilePath());
// relPath = fileInfo.dir().relativeFilePath(libFile.absoluteFilePath());
relPath = fileInfo.absoluteFilePath();
}

xmlWriter.writeAttribute("Name", m_modelComponent->componentInfo()->id());
Expand Down Expand Up @@ -821,7 +822,7 @@ void GModelComponent::writeComponent(QXmlStreamWriter &xmlWriter)
}
else
{
QString relPath = projectDir.relativeFilePath(m_modelComponent->componentInfo()->libraryFilePath());
QString relPath = m_modelComponent->componentInfo()->libraryFilePath();
xmlWriter.writeAttribute("Name",m_modelComponent->componentInfo()->id());
xmlWriter.writeAttribute("Caption" , m_modelComponent->caption());
xmlWriter.writeAttribute("Description" , m_modelComponent->description());
Expand Down

0 comments on commit 2db97c1

Please sign in to comment.