Commit cdd60c95 authored by jean-pierre charras's avatar jean-pierre charras

Libedit: fix minor bug: Copy doc not working in Properties dialog.

parent aac10106
......@@ -236,25 +236,27 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
}
void DIALOG_EDIT_COMPONENT_IN_LIBRARY::CopyDocToAlias( wxCommandEvent& event )
void DIALOG_EDIT_COMPONENT_IN_LIBRARY::CopyDocFromRootToAlias( wxCommandEvent& event )
{
if( m_Parent == NULL )
return;
LIB_ALIAS* alias;
LIB_ALIAS* parent_alias;
LIB_COMPONENT* component = m_Parent->GetComponent();
if( component == NULL )
return;
alias = component->GetAlias( m_Parent->GetAliasName() );
// search for the main alias: this is the first alias in alias list
// something like the main component
parent_alias = component->GetAlias( 0 );
if( alias == NULL )
if( parent_alias == NULL ) // Should never occur (bug)
return;
m_DocCtrl->SetValue( alias->GetDescription() );
m_DocfileCtrl->SetValue( alias->GetDocFileName() );
m_KeywordsCtrl->SetValue( alias->GetKeyWords() );
m_DocCtrl->SetValue( parent_alias->GetDescription() );
m_DocfileCtrl->SetValue( parent_alias->GetDocFileName() );
m_KeywordsCtrl->SetValue( parent_alias->GetKeyWords() );
}
......
......@@ -34,7 +34,7 @@ private:
void AddAliasOfPart(wxCommandEvent& event);
bool ChangeNbUnitsPerPackage(int newUnit);
bool SetUnsetConvert();
void CopyDocToAlias(wxCommandEvent& event);
void CopyDocFromRootToAlias(wxCommandEvent& event);
void BrowseAndSelectDocFile(wxCommandEvent& event);
void DeleteAllFootprintFilter(wxCommandEvent& event);
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
#define __DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/checkbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/spinctrl.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/listbox.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_LIBEDIT_NOTEBOOK 1000
#define ID_COPY_DOC_TO_ALIAS 1001
#define ID_BROWSE_DOC_FILES 1002
#define ID_ADD_ALIAS 1003
#define ID_DELETE_ONE_ALIAS 1004
#define ID_DELETE_ALL_ALIAS 1005
#define ID_ADD_FOOTPRINT_FILTER 1006
#define ID_DELETE_ONE_FOOTPRINT_FILTER 1007
#define ID_DELETE_ALL_FOOTPRINT_FILTER 1008
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM
{
private:
protected:
wxNotebook* m_NoteBook;
wxPanel* m_PanelBasic;
wxCheckBox* m_AsConvertButt;
wxCheckBox* m_ShowPinNumButt;
wxCheckBox* m_ShowPinNameButt;
wxCheckBox* m_PinsNameInsideButt;
wxStaticLine* m_staticline3;
wxStaticText* m_staticTextNbUnits;
wxSpinCtrl* m_SelNumberOfUnits;
wxStaticText* m_staticTextskew;
wxSpinCtrl* m_SetSkew;
wxStaticLine* m_staticline1;
wxCheckBox* m_OptionPower;
wxCheckBox* m_OptionPartsLocked;
wxPanel* m_PanelDoc;
wxStaticText* m_staticTextDescription;
wxTextCtrl* m_DocCtrl;
wxStaticText* m_staticTextKeywords;
wxTextCtrl* m_KeywordsCtrl;
wxStaticText* m_staticTextDocFileName;
wxTextCtrl* m_DocfileCtrl;
wxButton* m_ButtonCopyDoc;
wxButton* m_buttonBrowseDocFiles;
wxPanel* m_PanelAlias;
wxStaticText* m_staticTextAlias;
wxListBox* m_PartAliasListCtrl;
wxButton* m_ButtonAddeAlias;
wxButton* m_ButtonDeleteOneAlias;
wxButton* m_ButtonDeleteAllAlias;
wxPanel* m_PanelFootprintFilter;
wxStaticText* m_staticTextFootprints;
wxListBox* m_FootprintFilterListBox;
wxButton* m_buttonAddFpF;
wxButton* m_ButtonDeleteOneFootprintFilter;
wxButton* m_ButtonDeleteAllFootprintFilter;
wxStdDialogButtonSizer* m_stdSizerButton;
wxButton* m_stdSizerButtonOK;
wxButton* m_stdSizerButtonCancel;
// Virtual event handlers, overide them in your derived class
virtual void CopyDocToAlias( wxCommandEvent& event ) { event.Skip(); }
virtual void BrowseAndSelectDocFile( wxCommandEvent& event ) { event.Skip(); }
virtual void AddAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void AddFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteOneFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id = ID_LIBEDIT_NOTEBOOK, const wxString& title = _("Lib Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE();
};
#endif //__DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
#define __DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/checkbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/spinctrl.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/listbox.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_LIBEDIT_NOTEBOOK 1000
#define ID_COPY_DOC_TO_ALIAS 1001
#define ID_BROWSE_DOC_FILES 1002
#define ID_ADD_ALIAS 1003
#define ID_DELETE_ONE_ALIAS 1004
#define ID_DELETE_ALL_ALIAS 1005
#define ID_ADD_FOOTPRINT_FILTER 1006
#define ID_DELETE_ONE_FOOTPRINT_FILTER 1007
#define ID_DELETE_ALL_FOOTPRINT_FILTER 1008
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM
{
private:
protected:
wxNotebook* m_NoteBook;
wxPanel* m_PanelBasic;
wxCheckBox* m_AsConvertButt;
wxCheckBox* m_ShowPinNumButt;
wxCheckBox* m_ShowPinNameButt;
wxCheckBox* m_PinsNameInsideButt;
wxStaticLine* m_staticline3;
wxStaticText* m_staticTextNbUnits;
wxSpinCtrl* m_SelNumberOfUnits;
wxStaticText* m_staticTextskew;
wxSpinCtrl* m_SetSkew;
wxStaticLine* m_staticline1;
wxCheckBox* m_OptionPower;
wxCheckBox* m_OptionPartsLocked;
wxPanel* m_PanelDoc;
wxStaticText* m_staticTextDescription;
wxTextCtrl* m_DocCtrl;
wxStaticText* m_staticTextKeywords;
wxTextCtrl* m_KeywordsCtrl;
wxStaticText* m_staticTextDocFileName;
wxTextCtrl* m_DocfileCtrl;
wxButton* m_ButtonCopyDoc;
wxButton* m_buttonBrowseDocFiles;
wxPanel* m_PanelAlias;
wxStaticText* m_staticTextAlias;
wxListBox* m_PartAliasListCtrl;
wxButton* m_ButtonAddeAlias;
wxButton* m_ButtonDeleteOneAlias;
wxButton* m_ButtonDeleteAllAlias;
wxPanel* m_PanelFootprintFilter;
wxStaticText* m_staticTextFootprints;
wxListBox* m_FootprintFilterListBox;
wxButton* m_buttonAddFpF;
wxButton* m_ButtonDeleteOneFootprintFilter;
wxButton* m_ButtonDeleteAllFootprintFilter;
wxStdDialogButtonSizer* m_stdSizerButton;
wxButton* m_stdSizerButtonOK;
wxButton* m_stdSizerButtonCancel;
// Virtual event handlers, overide them in your derived class
virtual void CopyDocFromRootToAlias( wxCommandEvent& event ) { event.Skip(); }
virtual void BrowseAndSelectDocFile( wxCommandEvent& event ) { event.Skip(); }
virtual void AddAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void AddFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteOneFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id = ID_LIBEDIT_NOTEBOOK, const wxString& title = _("Lib Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE();
};
#endif //__DIALOG_EDIT_COMPONENT_IN_LIB_BASE_H__
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