From c266cef6b1cb060f9aff366e6d2c16063daed704 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 10 Sep 2008 11:27:45 +0000 Subject: [PATCH] Changed the path management so that the node path is prepended on the database path list, rather than replacing it. --- src/osgPlugins/osg/ReaderWriterOSG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/osg/ReaderWriterOSG.cpp b/src/osgPlugins/osg/ReaderWriterOSG.cpp index e07434c75..509d50eb6 100644 --- a/src/osgPlugins/osg/ReaderWriterOSG.cpp +++ b/src/osgPlugins/osg/ReaderWriterOSG.cpp @@ -45,7 +45,7 @@ class OSGReaderWriter : public ReaderWriter // code for setting up the database path so that internally referenced file are searched for on relative paths. osg::ref_ptr local_opt = opt ? static_cast(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options; - local_opt->setDatabasePath(osgDB::getFilePath(fileName)); + local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName)); std::ifstream fin(fileName.c_str()); if (fin) @@ -106,7 +106,7 @@ class OSGReaderWriter : public ReaderWriter // code for setting up the database path so that internally referenced file are searched for on relative paths. osg::ref_ptr local_opt = opt ? static_cast(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options; - local_opt->setDatabasePath(osgDB::getFilePath(fileName)); + local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName)); std::ifstream fin(fileName.c_str()); if (fin)