add full path to aux files

parent ed3c4eff
Pipeline #19414 passed with stages
in 18 seconds
......@@ -854,8 +854,8 @@ bool MainWindow::addPedestrianGroup(int groupID,QString fileName)
// try to parse the txt file
else if(fileName.endsWith(".txt",Qt::CaseInsensitive))
{
QString source_file=SaxParser::extractSourceFileTXT(fileName);
QString goal_file=SaxParser::extractGoalFileTXT(fileName);
QString source_file= wd + QDir::separator() + SaxParser::extractSourceFileTXT(fileName);
QString goal_file=wd + QDir::separator() + SaxParser::extractGoalFileTXT(fileName);
QFileInfo check_file(source_file);
if( !(check_file.exists() && check_file.isFile()) )
{
......
......@@ -706,6 +706,8 @@ bool SaxParser::parseGeometryJPS(QString fileName, GeometryFactory& geoFac)
Debug::Messages("wd: <%s>",wd.toStdString().c_str());
Building* building = new Building();
string geometrypath = fileName.toStdString();
building->SetProjectRootDir(wd.toStdString());
// read the geometry
if(!building->LoadGeometry(geometrypath))
return false;
......
......@@ -350,10 +350,12 @@ const std::string& Building::GetGeometryFilename() const
bool Building::LoadGeometry(const std::string &geometryfile)
{
//get the geometry filename from the project file
string geoFilenameWithPath= _projectRootDir + geometryfile;
string geoFilenameWithPath= geometryfile; //_projectRootDir +
Debug::Messages("LoadGeometry: Root Dir: <%s>", _projectRootDir.c_str());
Debug::Messages("LoadGeometry: geometryfile: <%s>", geometryfile.c_str());
Debug::Messages("LoadGeometry: geoFilenameWithPath: <%s>", geoFilenameWithPath.c_str());
if(geometryfile=="")
{
TiXmlDocument doc(_projectFilename);
......@@ -587,7 +589,7 @@ bool Building::LoadGeometry(const std::string &geometryfile)
TiXmlNode * xNodeFile = xTransNode->FirstChild("file");
if(xNodeFile)
{
std::string transFilename = xNodeFile->FirstChild()->ValueStr();
std::string transFilename = _projectRootDir + "/" +xNodeFile->FirstChild()->ValueStr();
Log->Write("INFO:\tParsing transition from file <%s>", transFilename.c_str());
TiXmlDocument docTrans(transFilename);
if (!docTrans.LoadFile()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment