Commit dfc624e6 authored by Administrateur's avatar Administrateur

Fixed a crash that happens sometimes when opening the design rule dialog.

preparing auto refresh of the 3D view in mod edit (not yet working)
parent 5f971428
...@@ -33,6 +33,7 @@ double DataScale3D; // 3D conversion units. ...@@ -33,6 +33,7 @@ double DataScale3D; // 3D conversion units.
BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame ) BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
EVT_ACTIVATE( WinEDA3D_DrawFrame::OnActivate )
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom ) EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_END_COMMAND_3D, EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_END_COMMAND_3D,
WinEDA3D_DrawFrame::Process_Special_Functions ) WinEDA3D_DrawFrame::Process_Special_Functions )
...@@ -351,6 +352,18 @@ void WinEDA3D_DrawFrame::NewDisplay() ...@@ -351,6 +352,18 @@ void WinEDA3D_DrawFrame::NewDisplay()
} }
void WinEDA3D_DrawFrame::OnActivate( wxActivateEvent& event )
{
// Reload data if 3D frame shows a footprint,
// because it can be changed since last frame activation
if( m_Parent->m_Ident == MODULE_EDITOR_FRAME )
{
// NewDisplay();
}
event.Skip(); // required under wxMAC
}
/* called to set the background color of the 3D scene /* called to set the background color of the 3D scene
*/ */
void WinEDA3D_DrawFrame::Set3DBgColor() void WinEDA3D_DrawFrame::Set3DBgColor()
......
...@@ -123,7 +123,7 @@ public: ...@@ -123,7 +123,7 @@ public:
double m_BoardScale; /* Normalization scale for coordinates: double m_BoardScale; /* Normalization scale for coordinates:
* when scaled between -1.0 and +1.0 */ * when scaled between -1.0 and +1.0 */
double m_LayerZcoord[32]; double m_LayerZcoord[32];
double m_ActZpos; double m_ActZpos;
public: Info_3D_Visu(); public: Info_3D_Visu();
~Info_3D_Visu(); ~Info_3D_Visu();
}; };
...@@ -219,6 +219,7 @@ public: ...@@ -219,6 +219,7 @@ public:
void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void Process_Special_Functions( wxCommandEvent& event ); void Process_Special_Functions( wxCommandEvent& event );
void Process_Zoom( wxCommandEvent& event ); void Process_Zoom( wxCommandEvent& event );
void OnActivate( wxActivateEvent& event );
void NewDisplay(); void NewDisplay();
void Set3DBgColor(); void Set3DBgColor();
......
...@@ -290,12 +290,15 @@ void DIALOG_DESIGN_RULES::InitDimensionsLists() ...@@ -290,12 +290,15 @@ void DIALOG_DESIGN_RULES::InitDimensionsLists()
static bool sortByClassThenName( NETCUP* a, NETCUP* b ) static bool sortByClassThenName( NETCUP* a, NETCUP* b )
{ {
// return a < b // return a < b
if( a->clazz < b->clazz ) if( a->clazz < b->clazz )
return true; return true;
if( a->net < b->net ) // inside the same class, sort by net name:
return true; if( a->clazz == b->clazz )
{
if( a->net < b->net )
return true;
}
return false; return false;
} }
......
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