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
be839aca
Commit
be839aca
authored
Apr 02, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Footprint Library Wizard for builds with GIthub plugin disabled.
parent
bbbb84e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
wizard_add_fplib.cpp
pcbnew/dialogs/wizard_add_fplib.cpp
+25
-21
No files found.
pcbnew/dialogs/wizard_add_fplib.cpp
View file @
be839aca
...
...
@@ -378,9 +378,12 @@ void WIZARD_FPLIB_TABLE::OnPageChanged( wxWizardEvent& aEvent )
SetBitmap
(
KiBitmap
(
wizard_add_fplib_icon_xpm
)
);
enableNext
(
true
);
#ifdef BUILD_GITHUB_PLUGIN
if
(
GetCurrentPage
()
==
m_githubListDlg
)
setupGithubList
();
else
if
(
GetCurrentPage
()
==
m_fileSelectDlg
)
else
#endif
if
(
GetCurrentPage
()
==
m_fileSelectDlg
)
setupFileSelect
();
else
if
(
GetCurrentPage
()
==
m_reviewDlg
)
setupReview
();
...
...
@@ -481,6 +484,7 @@ void WIZARD_FPLIB_TABLE::OnChangeSearch( wxCommandEvent& aEvent )
void
WIZARD_FPLIB_TABLE
::
OnWizardFinished
(
wxWizardEvent
&
aEvent
)
{
#ifdef BUILD_GITHUB_PLUGIN
// Shall we download a localy copy of the libraries
if
(
GetLibSource
()
==
GITHUB
&&
m_downloadGithub
->
GetValue
()
)
{
...
...
@@ -511,11 +515,11 @@ void WIZARD_FPLIB_TABLE::OnWizardFinished( wxWizardEvent& aEvent )
wxString
path
=
it
->
GetAbsolutePath
();
path
.
Replace
(
GetGithubURL
(),
getDownloadDir
()
);
it
->
setPath
(
path
);
std
::
cout
<<
"replaced path "
<<
it
->
GetAbsolutePath
()
<<
std
::
endl
;
it
->
setPluginType
(
IO_MGR
::
KICAD
);
}
}
}
#endif
}
...
...
@@ -637,6 +641,25 @@ bool WIZARD_FPLIB_TABLE::downloadGithubLibsFromList( wxArrayString& aUrlList,
return
true
;
}
void
WIZARD_FPLIB_TABLE
::
setupGithubList
()
{
// Enable 'Next' only if there is at least one library selected
wxArrayInt
checkedIndices
;
m_checkListGH
->
GetCheckedItems
(
checkedIndices
);
enableNext
(
checkedIndices
.
GetCount
()
>
0
);
// Update only if necessary
if
(
m_githubLibs
.
GetCount
()
==
0
)
getLibsListGithub
(
m_githubLibs
);
m_searchCtrlGH
->
Clear
();
// Clear the review list so it will be reloaded
m_libraries
.
clear
();
m_listCtrlReview
->
DeleteAllItems
();
}
#endif
/* BUILD_GITHUB_PLUGIN */
...
...
@@ -733,25 +756,6 @@ void WIZARD_FPLIB_TABLE::setupDialogOrder()
}
void
WIZARD_FPLIB_TABLE
::
setupGithubList
()
{
// Enable 'Next' only if there is at least one library selected
wxArrayInt
checkedIndices
;
m_checkListGH
->
GetCheckedItems
(
checkedIndices
);
enableNext
(
checkedIndices
.
GetCount
()
>
0
);
// Update only if necessary
if
(
m_githubLibs
.
GetCount
()
==
0
)
getLibsListGithub
(
m_githubLibs
);
m_searchCtrlGH
->
Clear
();
// Clear the review list so it will be reloaded
m_libraries
.
clear
();
m_listCtrlReview
->
DeleteAllItems
();
}
void
WIZARD_FPLIB_TABLE
::
setupFileSelect
()
{
// Disable the button until something is selected
...
...
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