Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
6ebc2a52
Commit
6ebc2a52
authored
Aug 18, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problems in relative paths calculations for libs and docs files
parent
51efe030
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
30 deletions
+29
-30
edaappl.cpp
common/edaappl.cpp
+11
-16
dialog_edit_module_for_BoardEditor.cpp
pcbnew/dialog_edit_module_for_BoardEditor.cpp
+8
-6
dialog_edit_module_for_Modedit.cpp
pcbnew/dialog_edit_module_for_Modedit.cpp
+10
-8
No files found.
common/edaappl.cpp
View file @
6ebc2a52
...
...
@@ -1013,27 +1013,22 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF
*/
wxFileName
fn
=
aFullFilename
;
wxString
filename
=
aFullFilename
;
int
pathlen
=
-
1
;
// path len, used to find the better subpath within defualts paths
unsigned
pathlen
=
fn
.
GetPath
().
Len
();
/* path len, used to find the better (shortest) subpath
* within defaults paths */
if
(
m_libSearchPaths
.
Index
(
fn
.
GetPath
()
)
!=
wxNOT_FOUND
)
// Ok, trivial case
filename
=
fn
.
GetName
();
else
// not in the default, : see if this file is in a subpath:
{
filename
=
fn
.
GetPathWithSep
()
+
fn
.
GetFullName
();
for
(
unsigned
kk
=
0
;
kk
<
m_libSearchPaths
.
GetCount
();
kk
++
)
{
fn
=
aFullFilename
;
// Search for the shortest subpath within m_libSearchPaths:
if
(
fn
.
MakeRelativeTo
(
m_libSearchPaths
[
kk
]
)
)
{
if
(
fn
.
GetPathWithSep
().
StartsWith
(
wxT
(
".."
)
)
)
// Path outside kicad libs paths
continue
;
if
(
pathlen
<
0
// a first subpath is found
||
pathlen
>
(
int
)
fn
.
GetPath
().
Len
()
)
// or a better subpath if found
if
(
pathlen
>
fn
.
GetPath
().
Len
()
)
// A better (shortest) subpath is found
{
filename
=
fn
.
GetPathWithSep
()
+
fn
.
GetFullName
();
pathlen
=
fn
.
GetPath
().
Len
();
}
fn
=
aFullFilename
;
//Try to find a better subpath
}
}
}
...
...
pcbnew/dialog_edit_module_for_BoardEditor.cpp
View file @
6ebc2a52
...
...
@@ -182,12 +182,14 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties()
S3D_MASTER
*
draw3D
=
m_CurrentModule
->
m_3D_Drawings
;
while
(
draw3D
)
{
if
(
!
draw3D
->
m_Shape3DName
.
IsEmpty
()
)
{
S3D_MASTER
*
draw3DCopy
=
new
S3D_MASTER
(
NULL
);
draw3DCopy
->
Copy
(
draw3D
);
m_Shapes3D_list
.
push_back
(
draw3DCopy
);
m_3D_ShapeNameListBox
->
Append
(
draw3DCopy
->
m_Shape3DName
);
}
draw3D
=
(
S3D_MASTER
*
)
draw3D
->
Next
();
}
...
...
pcbnew/dialog_edit_module_for_Modedit.cpp
View file @
6ebc2a52
...
...
@@ -46,9 +46,9 @@ DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR()
}
/***************************************/
/***************************************
*****************
/
void
DIALOG_MODULE_MODULE_EDITOR
::
InitModeditProperties
()
/***************************************/
/***************************************
*****************
/
{
SetFocus
();
...
...
@@ -58,12 +58,14 @@ void DIALOG_MODULE_MODULE_EDITOR::InitModeditProperties()
S3D_MASTER
*
draw3D
=
m_CurrentModule
->
m_3D_Drawings
;
while
(
draw3D
)
{
if
(
!
draw3D
->
m_Shape3DName
.
IsEmpty
()
)
{
S3D_MASTER
*
draw3DCopy
=
new
S3D_MASTER
(
NULL
);
draw3DCopy
->
Copy
(
draw3D
);
m_Shapes3D_list
.
push_back
(
draw3DCopy
);
m_3D_ShapeNameListBox
->
Append
(
draw3DCopy
->
m_Shape3DName
);
}
draw3D
=
(
S3D_MASTER
*
)
draw3D
->
Next
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment