Commit f3230893 authored by charras's avatar charras

Solved minor problems in eeschema, and code cleaning.

parent ae0768c3
This diff is collapsed.
......@@ -103,6 +103,12 @@ void WinEDA3D_DrawFrame::ReCreateVToolbar()
void WinEDA3D_DrawFrame::ReCreateMenuBar()
/**********************************************/
{
bool full_options = true;
// If called from the display frame of cvpcb, only some options are relevant
if ( m_Parent->m_FrameName == wxT( "CmpFrame" ) ) // Called from cvpcb !
full_options = false; // Do not display all options
wxMenuBar* menuBar = new wxMenuBar;
wxMenu* fileMenu = new wxMenu;
......@@ -121,28 +127,33 @@ void WinEDA3D_DrawFrame::ReCreateMenuBar()
_( "Choose background color" ), palette_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_AXIS_ONOFF,
_( "Axis On/Off" ), axis3d_front_xpm );
_( "3D Axis On/Off" ), axis3d_front_xpm );
if ( full_options )
{
ADD_MENUITEM( referencesMenu, ID_MENU3D_MODULE_ONOFF,
_( "Module 3D On/Off" ), add_component_xpm );
_( "3D Footprints Shapes On/Off" ), add_component_xpm );
#if 0
ADD_MENUITEM( referencesMenu, ID_MENU3D_PLACE_ONOFF,
_( "PCB place 3D On/off" ), select_w_layer_xpm );
#endif
ADD_MENUITEM( referencesMenu, ID_MENU3D_ZONE_ONOFF,
_( "Zone On/Off" ), add_zone_xpm );
_( "Zone Filling On/Off" ), add_zone_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Comments On/Off" ), edit_sheet_xpm );
_( "Comments Layer On/Off" ), edit_sheet_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_DRAWINGS_ONOFF,
_( "Drawings On/Off" ), options_text_xpm );
_( "Drawings Layer On/Off" ), add_polygon_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO1_ONOFF,
_( "Eco1 On/Off" ), options_text_xpm );
_( "Eco1 Layer On/Off" ), tools_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO2_ONOFF,
_( "Eco2 On/Off" ), options_text_xpm );
_( "Eco2 Layer On/Off" ), tools_xpm );
}
SetMenuBar( menuBar );
}
......
......@@ -44,17 +44,17 @@ void InitKiCadAbout(wxAboutDialogInfo& info)
/* Add developers */
info.AddDeveloper(_T("Dick Hollenbeck <dick@softplc.com>"));
info.AddDeveloper(_T("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
info.AddDeveloper(_T("\nJean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
/* Add document writers */
info.AddDocWriter(_T("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
info.AddDocWriter(_T("Igor Plyatov <plyatov@gmail.com>"));
info.AddDocWriter(_T("\nIgor Plyatov <plyatov@gmail.com>"));
/* Add translators */
info.AddTranslator(_T("Czech (CZ) Milan Horák <stranger@tiscali.cz>"));
info.AddTranslator(_T("Dutch (NL) Jerry Jacobs <jerkejacobs@gmail.com>"));
info.AddTranslator(_T("French (FR) Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
info.AddTranslator(_T("Polish (PL) Mateusz Skowroński <skowri@gmail.com>"));
info.AddTranslator(_T("Russian (RU) Igor Plyatov <plyatov@gmail.com>"));
info.AddTranslator(_T("\nDutch (NL) Jerry Jacobs <jerkejacobs@gmail.com>"));
info.AddTranslator(_T("\nFrench (FR) Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
info.AddTranslator(_T("\nPolish (PL) Mateusz Skowroński <skowri@gmail.com>"));
info.AddTranslator(_T("\nRussian (RU) Igor Plyatov <plyatov@gmail.com>"));
}
......@@ -226,6 +226,8 @@ void WinEDA_SchematicFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPi
wxPoint curpos, oldpos;
int hotkey = 0;
ActiveScreen = screen;
curpos = screen->m_MousePosition;
oldpos = screen->m_Curseur;
......@@ -355,6 +357,8 @@ void WinEDA_LibeditFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPixe
wxPoint curpos, oldpos;
int hotkey = 0;
ActiveScreen = screen;
curpos = screen->m_MousePosition;
oldpos = screen->m_Curseur;
......@@ -483,6 +487,8 @@ void WinEDA_ViewlibFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPixe
wxPoint curpos, oldpos;
int hotkey = 0;
ActiveScreen = screen;
curpos = screen->m_MousePosition;
oldpos = screen->m_Curseur;
......
......@@ -25,7 +25,7 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
if( CurrentLibEntry == NULL )
if( CurrentLibEntry == NULL ) // No component loaded !
return;
if( m_ID_current_state == 0 )
......@@ -107,11 +107,11 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case ID_LIBEDIT_BODY_CIRCLE_BUTT:
case ID_LIBEDIT_BODY_RECT_BUTT:
case ID_LIBEDIT_BODY_TEXT_BUTT:
if( CurrentDrawItem == NULL )
if( CurrentDrawItem == NULL || CurrentDrawItem->m_Flags == 0 )
{
CurrentDrawItem = CreateGraphicItem( DC );
}
else
else if( CurrentDrawItem )
{
if( CurrentDrawItem->m_Flags & IS_NEW )
GraphicItemBeginDraw( DC );
......
......@@ -181,9 +181,6 @@ LibEDA_BaseStruct* WinEDA_LibeditFrame::CreateGraphicItem( wxDC* DC )
int DrawType;
int* ptpoly;
if( CurrentDrawItem )
return NULL;
DrawPanel->m_IgnoreMouseEvents = TRUE;
// Creation du nouvel element
......
No preview for this file type
This diff is collapsed.
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