Fix filename resolution within VRML2 Inline{}
This commit is contained in:
parent
978268250e
commit
2dfd8064d4
|
@ -133,6 +133,13 @@ SGNODE* WRL2BASE::GetInlineData( const std::string& aName )
|
|||
wxFileName fn;
|
||||
fn.Assign( tname );
|
||||
|
||||
if( fn.IsRelative() && !m_dir.empty() )
|
||||
{
|
||||
wxString fname = wxString::FromUTF8Unchecked( m_dir.c_str() );
|
||||
fname.append( tname );
|
||||
fn.Assign( fname );
|
||||
}
|
||||
|
||||
if( !fn.Normalize() )
|
||||
{
|
||||
m_inlineModels.insert( std::pair< std::string, SGNODE* >( aName, NULL ) );
|
||||
|
@ -200,6 +207,7 @@ bool WRL2BASE::Read( WRLPROC& proc )
|
|||
}
|
||||
|
||||
WRL2NODE* node = NULL;
|
||||
m_dir = proc.GetParentDir();
|
||||
|
||||
while( ReadNode( proc, this, &node ) && !proc.eof() );
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class WRL2BASE : public WRL2NODE
|
|||
{
|
||||
private:
|
||||
bool m_useInline;
|
||||
std::string m_dir; // parent directory of the file
|
||||
|
||||
// handle cases of USE / DEF
|
||||
bool implementUse( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode );
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
|
||||
#define PLUGIN_VRML_MAJOR 1
|
||||
#define PLUGIN_VRML_MINOR 3
|
||||
#define PLUGIN_VRML_PATCH 0
|
||||
#define PLUGIN_VRML_REVNO 1
|
||||
#define PLUGIN_VRML_PATCH 1
|
||||
#define PLUGIN_VRML_REVNO 0
|
||||
|
||||
|
||||
const char* GetKicadPluginName( void )
|
||||
|
|
Loading…
Reference in New Issue