Commit afd39b3d authored by charras's avatar charras

code cleaning

parent 070b12d5
...@@ -171,14 +171,14 @@ Info_3D_Visu::Info_3D_Visu() ...@@ -171,14 +171,14 @@ Info_3D_Visu::Info_3D_Visu()
m_Rot[ii] = 0.0; m_Rot[ii] = 0.0;
m_Layers = 1; m_Layers = 1;
m_BoardSettings = NULL; m_BoardSettings = NULL;
m_Draw3DAxis = TRUE; m_Draw3DAxis = TRUE;
m_Draw3DModule = TRUE; m_Draw3DModule = TRUE;
m_Draw3DZone = TRUE; m_Draw3DZone = TRUE;
m_Draw3DComments = TRUE; m_Draw3DComments = TRUE;
m_Draw3DDrawings = TRUE; m_Draw3DDrawings = TRUE;
m_Draw3DEco1 = TRUE; m_Draw3DEco1 = TRUE;
m_Draw3DEco2 = TRUE; m_Draw3DEco2 = TRUE;
} }
...@@ -209,8 +209,8 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, ...@@ -209,8 +209,8 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
text += ReturnUnitSymbol( units ); text += ReturnUnitSymbol( units );
msgtitle = new wxStaticText( parent, -1, text, wxDefaultPosition, wxSize( msgtitle = new wxStaticText( parent, -1, text, wxDefaultPosition, wxSize(
-1, -1,
-1 ), 0 ); -1 ), 0 );
BoxSizer->Add( msgtitle, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxBOTTOM | wxADJUST_MINSIZE ); BoxSizer->Add( msgtitle, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxBOTTOM | wxADJUST_MINSIZE );
...@@ -225,11 +225,11 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, ...@@ -225,11 +225,11 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
5 ); 5 );
m_XValueCtrl = new wxTextCtrl( parent, m_XValueCtrl = new wxTextCtrl( parent,
-1, -1,
wxEmptyString, wxEmptyString,
wxDefaultPosition, wxDefaultPosition,
wxSize( -1, -1 ), wxSize( -1, -1 ),
0 ); 0 );
GridSizer->Add( m_XValueCtrl, GridSizer->Add( m_XValueCtrl,
0, 0,
...@@ -237,19 +237,19 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, ...@@ -237,19 +237,19 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
5 ); 5 );
msgtitle = new wxStaticText( parent, -1, wxT( msgtitle = new wxStaticText( parent, -1, wxT(
"Y:" ), wxDefaultPosition, wxSize( -1, "Y:" ), wxDefaultPosition, wxSize( -1,
-1 ), 0 ); -1 ), 0 );
GridSizer->Add( msgtitle, GridSizer->Add( msgtitle,
0, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
5 ); 5 );
m_YValueCtrl = new wxTextCtrl( parent, m_YValueCtrl = new wxTextCtrl( parent,
-1, -1,
wxEmptyString, wxEmptyString,
wxDefaultPosition, wxDefaultPosition,
wxSize( -1, -1 ), wxSize( -1, -1 ),
0 ); 0 );
GridSizer->Add( m_YValueCtrl, GridSizer->Add( m_YValueCtrl,
0, 0,
...@@ -257,19 +257,19 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, ...@@ -257,19 +257,19 @@ WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
5 ); 5 );
msgtitle = new wxStaticText( parent, -1, wxT( msgtitle = new wxStaticText( parent, -1, wxT(
"Z:" ), wxDefaultPosition, wxSize( -1, "Z:" ), wxDefaultPosition, wxSize( -1,
-1 ), 0 ); -1 ), 0 );
GridSizer->Add( msgtitle, GridSizer->Add( msgtitle,
0, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
5 ); 5 );
m_ZValueCtrl = new wxTextCtrl( parent, m_ZValueCtrl = new wxTextCtrl( parent,
-1, -1,
wxEmptyString, wxEmptyString,
wxDefaultPosition, wxDefaultPosition,
wxSize( -1, -1 ), wxSize( -1, -1 ),
0 ); 0 );
GridSizer->Add( m_ZValueCtrl, GridSizer->Add( m_ZValueCtrl,
0, 0,
......
...@@ -343,6 +343,7 @@ void WinEDA3D_DrawFrame::NewDisplay() ...@@ -343,6 +343,7 @@ void WinEDA3D_DrawFrame::NewDisplay()
m_Canvas->Refresh( true ); m_Canvas->Refresh( true );
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DBgColor() void WinEDA3D_DrawFrame::Set3DBgColor()
/******************************************/ /******************************************/
...@@ -367,22 +368,28 @@ void WinEDA3D_DrawFrame::Set3DBgColor() ...@@ -367,22 +368,28 @@ void WinEDA3D_DrawFrame::Set3DBgColor()
} }
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DAxisOnOff() void WinEDA3D_DrawFrame::Set3DAxisOnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DAxis) g_Parm_3D_Visu.m_Draw3DAxis = FALSE; if( g_Parm_3D_Visu.m_Draw3DAxis )
else g_Parm_3D_Visu.m_Draw3DAxis = TRUE; g_Parm_3D_Visu.m_Draw3DAxis = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DAxis = TRUE;
NewDisplay();
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DModuleOnOff() void WinEDA3D_DrawFrame::Set3DModuleOnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DModule) g_Parm_3D_Visu.m_Draw3DModule = FALSE; if( g_Parm_3D_Visu.m_Draw3DModule )
else g_Parm_3D_Visu.m_Draw3DModule = TRUE; g_Parm_3D_Visu.m_Draw3DModule = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DModule = TRUE;
NewDisplay();
} }
...@@ -390,43 +397,57 @@ void WinEDA3D_DrawFrame::Set3DModuleOnOff() ...@@ -390,43 +397,57 @@ void WinEDA3D_DrawFrame::Set3DModuleOnOff()
void WinEDA3D_DrawFrame::Set3DZoneOnOff() void WinEDA3D_DrawFrame::Set3DZoneOnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DZone) g_Parm_3D_Visu.m_Draw3DZone = FALSE; if( g_Parm_3D_Visu.m_Draw3DZone )
else g_Parm_3D_Visu.m_Draw3DZone = TRUE; g_Parm_3D_Visu.m_Draw3DZone = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DZone = TRUE;
NewDisplay();
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DCommentsOnOff() void WinEDA3D_DrawFrame::Set3DCommentsOnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DComments) g_Parm_3D_Visu.m_Draw3DComments = FALSE; if( g_Parm_3D_Visu.m_Draw3DComments )
else g_Parm_3D_Visu.m_Draw3DComments = TRUE; g_Parm_3D_Visu.m_Draw3DComments = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DComments = TRUE;
NewDisplay();
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DDrawingsOnOff() void WinEDA3D_DrawFrame::Set3DDrawingsOnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DDrawings) g_Parm_3D_Visu.m_Draw3DDrawings = FALSE; if( g_Parm_3D_Visu.m_Draw3DDrawings )
else g_Parm_3D_Visu.m_Draw3DDrawings = TRUE; g_Parm_3D_Visu.m_Draw3DDrawings = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DDrawings = TRUE;
NewDisplay();
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DEco1OnOff() void WinEDA3D_DrawFrame::Set3DEco1OnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DEco1) g_Parm_3D_Visu.m_Draw3DEco1 = FALSE; if( g_Parm_3D_Visu.m_Draw3DEco1 )
else g_Parm_3D_Visu.m_Draw3DEco1 = TRUE; g_Parm_3D_Visu.m_Draw3DEco1 = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DEco1 = TRUE;
NewDisplay();
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DEco2OnOff() void WinEDA3D_DrawFrame::Set3DEco2OnOff()
/******************************************/ /******************************************/
{ {
if (g_Parm_3D_Visu.m_Draw3DEco2) g_Parm_3D_Visu.m_Draw3DEco2 = FALSE; if( g_Parm_3D_Visu.m_Draw3DEco2 )
else g_Parm_3D_Visu.m_Draw3DEco2 = TRUE; g_Parm_3D_Visu.m_Draw3DEco2 = FALSE;
NewDisplay(); else
g_Parm_3D_Visu.m_Draw3DEco2 = TRUE;
NewDisplay();
} }
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