Commit cad5f9da authored by charras's avatar charras

minor bug fixed and minor enhancements

parent 47409788
...@@ -144,11 +144,11 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar() ...@@ -144,11 +144,11 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
} }
int jj = 1; int parts_count = 1;
if( component ) if( component )
jj = MAX( component->GetPartCount(), 1 ); parts_count = MAX( component->GetPartCount(), 1 );
SelpartBox->Clear(); SelpartBox->Clear();
for( ii = 0; ii < jj; ii++ ) for( ii = 0; ii < parts_count; ii++ )
{ {
wxString msg; wxString msg;
msg.Printf( _( "Part %c" ), 'A' + ii ); msg.Printf( _( "Part %c" ), 'A' + ii );
...@@ -156,7 +156,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar() ...@@ -156,7 +156,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
} }
SelpartBox->SetSelection( (m_unit > 0 ) ? m_unit - 1 : 0 ); SelpartBox->SetSelection( (m_unit > 0 ) ? m_unit - 1 : 0 );
SelpartBox->Enable( component && component->HasConversion() ); SelpartBox->Enable( parts_count > 1 );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC,
entry && ( entry->m_DocFile != wxEmptyString ) ); entry && ( entry->m_DocFile != wxEmptyString ) );
......
...@@ -98,7 +98,7 @@ bool WinEDA_ViewlibFrame::OnRightClick( const wxPoint& MousePos, ...@@ -98,7 +98,7 @@ bool WinEDA_ViewlibFrame::OnRightClick( const wxPoint& MousePos,
} }
/* Affiche en Ligne d'info la librairie en cours de visualisation */ /* Displays the name of the current opened library in the caption */
void WinEDA_ViewlibFrame::DisplayLibInfos() void WinEDA_ViewlibFrame::DisplayLibInfos()
{ {
wxString msg; wxString msg;
...@@ -120,7 +120,7 @@ void WinEDA_ViewlibFrame::DisplayLibInfos() ...@@ -120,7 +120,7 @@ void WinEDA_ViewlibFrame::DisplayLibInfos()
/*****************************************/ /*****************************************/
/* Routine to Select Current library */ /* Function to Select Current library */
/*****************************************/ /*****************************************/
void WinEDA_ViewlibFrame::SelectCurrentLibrary() void WinEDA_ViewlibFrame::SelectCurrentLibrary()
{ {
...@@ -246,10 +246,10 @@ void WinEDA_ViewlibFrame::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag ) ...@@ -246,10 +246,10 @@ void WinEDA_ViewlibFrame::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
} }
/*****************************************************************************/ /** function RedrawActiveWindow
/* Routine d'affichage du composant selectionne */ * Display the current selected component.
/* Si Le composant est un alias, le composant ROOT est recherche et affiche */ * If the component is an alias, the ROOT component is displayed
/*****************************************************************************/ */
void WinEDA_ViewlibFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) void WinEDA_ViewlibFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
{ {
LIB_COMPONENT* component; LIB_COMPONENT* component;
......
No preview for this file type
This diff is collapsed.
...@@ -65,7 +65,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare ...@@ -65,7 +65,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerOrientation->Add( m_OrientValue, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
PropLeftSizer->Add( sbSizerOrientation, 0, wxEXPAND, 5 ); PropLeftSizer->Add( sbSizerOrientation, 0, wxEXPAND, 5 );
...@@ -271,7 +271,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare ...@@ -271,7 +271,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel );
m_sdbSizerStdButtons->Realize(); m_sdbSizerStdButtons->Realize();
m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 );
this->SetSizer( m_GeneralBoxSizer ); this->SetSizer( m_GeneralBoxSizer );
this->Layout(); this->Layout();
......
...@@ -603,7 +603,7 @@ ...@@ -603,7 +603,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="bg"></property> <property name="bg"></property>
...@@ -2605,7 +2605,7 @@ ...@@ -2605,7 +2605,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALIGN_RIGHT</property> <property name="flag">wxEXPAND|wxALIGN_RIGHT|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1"> <object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property> <property name="Apply">0</property>
......
...@@ -240,7 +240,7 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa ...@@ -240,7 +240,7 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel );
m_sdbSizerStdButtons->Realize(); m_sdbSizerStdButtons->Realize();
m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 );
this->SetSizer( m_GeneralBoxSizer ); this->SetSizer( m_GeneralBoxSizer );
this->Layout(); this->Layout();
......
...@@ -2195,7 +2195,7 @@ ...@@ -2195,7 +2195,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALIGN_RIGHT</property> <property name="flag">wxEXPAND|wxALIGN_RIGHT|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1"> <object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property> <property name="Apply">0</property>
......
...@@ -42,11 +42,20 @@ void DIALOG_PADS_MASK_CLEARANCE::MyInit() ...@@ -42,11 +42,20 @@ void DIALOG_PADS_MASK_CLEARANCE::MyInit()
PutValueInLocalUnits( *m_SolderMaskMarginCtrl, PutValueInLocalUnits( *m_SolderMaskMarginCtrl,
g_DesignSettings.m_SolderMaskMargin, g_DesignSettings.m_SolderMaskMargin,
Internal_Unit ); Internal_Unit );
// These 2 parameters are usually < 0, so prepare entering a negative
// value, if current is 0
PutValueInLocalUnits( *m_SolderPasteMarginCtrl, PutValueInLocalUnits( *m_SolderPasteMarginCtrl,
g_DesignSettings.m_SolderPasteMargin, g_DesignSettings.m_SolderPasteMargin,
Internal_Unit ); Internal_Unit );
if( g_DesignSettings.m_SolderPasteMargin == 0 )
m_SolderPasteMarginCtrl->SetValue( wxT( "-" ) +
m_SolderPasteMarginCtrl->GetValue() );
wxString msg; wxString msg;
msg.Printf( wxT( "%f" ), g_DesignSettings.m_SolderPasteMarginRatio * 100.0 ); if( g_DesignSettings.m_SolderPasteMarginRatio == 0 )
msg.Printf( wxT( "-%f" ), g_DesignSettings.m_SolderPasteMarginRatio * 100.0 );
else
msg.Printf( wxT( "%f" ), g_DesignSettings.m_SolderPasteMarginRatio * 100.0 );
m_SolderPasteMarginRatioCtrl->SetValue( msg ); m_SolderPasteMarginRatioCtrl->SetValue( msg );
} }
......
...@@ -84,13 +84,16 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare ...@@ -84,13 +84,16 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare
bMainSizer->Add( bMainUpperSizer, 1, wxEXPAND, 5 ); bMainSizer->Add( bMainUpperSizer, 1, wxEXPAND, 5 );
m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 );
m_sdbButtonsSizer = new wxStdDialogButtonSizer(); m_sdbButtonsSizer = new wxStdDialogButtonSizer();
m_sdbButtonsSizerOK = new wxButton( this, wxID_OK ); m_sdbButtonsSizerOK = new wxButton( this, wxID_OK );
m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerOK ); m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerOK );
m_sdbButtonsSizerCancel = new wxButton( this, wxID_CANCEL ); m_sdbButtonsSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerCancel ); m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerCancel );
m_sdbButtonsSizer->Realize(); m_sdbButtonsSizer->Realize();
bMainSizer->Add( m_sdbButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); bMainSizer->Add( m_sdbButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_PADS_MASK_CLEARANCE_BASE</property> <property name="name">DIALOG_PADS_MASK_CLEARANCE_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">358,237</property> <property name="size">361,253</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Pads Mask Clearance</property> <property name="title">Pads Mask Clearance</property>
...@@ -691,7 +691,56 @@ ...@@ -691,7 +691,56 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL</property> <property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticline11</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1"> <object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property> <property name="Apply">0</property>
......
...@@ -50,6 +50,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public wxDialog ...@@ -50,6 +50,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public wxDialog
wxStaticText* m_staticTextRatio; wxStaticText* m_staticTextRatio;
wxTextCtrl* m_SolderPasteMarginRatioCtrl; wxTextCtrl* m_SolderPasteMarginRatioCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits; wxStaticText* m_SolderPasteRatioMarginUnits;
wxStaticLine* m_staticline11;
wxStdDialogButtonSizer* m_sdbButtonsSizer; wxStdDialogButtonSizer* m_sdbButtonsSizer;
wxButton* m_sdbButtonsSizerOK; wxButton* m_sdbButtonsSizerOK;
wxButton* m_sdbButtonsSizerCancel; wxButton* m_sdbButtonsSizerCancel;
...@@ -60,7 +61,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public wxDialog ...@@ -60,7 +61,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public wxDialog
public: public:
DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 358,237 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 361,253 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PADS_MASK_CLEARANCE_BASE(); ~DIALOG_PADS_MASK_CLEARANCE_BASE();
}; };
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
/* local variables */ /* local variables */
/* Hotkey list: */ /* Hotkey list: */
static Ki_HotkeyInfo HkSwitch2CopperLayer( wxT( "Switch to Copper layer" ), static Ki_HotkeyInfo HkSwitch2CopperLayer( wxT( "Switch to Copper layer" ),
HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEUP ); HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN );
static Ki_HotkeyInfo HkSwitch2ComponentLayer( wxT( "Switch to Component layer" ), static Ki_HotkeyInfo HkSwitch2ComponentLayer( wxT( "Switch to Component layer" ),
HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEDOWN ); HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP );
static Ki_HotkeyInfo HkSwitch2InnerLayer1( wxT( "Switch to Inner layer 1" ), static Ki_HotkeyInfo HkSwitch2InnerLayer1( wxT( "Switch to Inner layer 1" ),
HK_SWITCH_LAYER_TO_INNER1, WXK_F5 ); HK_SWITCH_LAYER_TO_INNER1, WXK_F5 );
static Ki_HotkeyInfo HkSwitch2InnerLayer2( wxT( "Switch to Inner layer 2" ), static Ki_HotkeyInfo HkSwitch2InnerLayer2( wxT( "Switch to Inner layer 2" ),
...@@ -112,7 +112,7 @@ Ki_HotkeyInfo* s_board_edit_Hotkey_List[] = ...@@ -112,7 +112,7 @@ Ki_HotkeyInfo* s_board_edit_Hotkey_List[] =
{ {
&HkTrackDisplayMode, &HkDelete, &HkTrackDisplayMode, &HkDelete,
&HkBackspace, &HkBackspace,
&HkAddNewTrack, &HkAddVia, &HkAddMicroVia, &HkAddNewTrack, &HkAddVia, &HkAddMicroVia,
&HkEndTrack, &HkMoveFootprint, &HkEndTrack, &HkMoveFootprint,
&HkFlipFootprint, &HkRotateFootprint, &HkDragFootprint, &HkFlipFootprint, &HkRotateFootprint, &HkDragFootprint,
&HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile,
...@@ -128,55 +128,40 @@ Ki_HotkeyInfo* s_board_edit_Hotkey_List[] = ...@@ -128,55 +128,40 @@ Ki_HotkeyInfo* s_board_edit_Hotkey_List[] =
Ki_HotkeyInfo* s_module_edit_Hotkey_List[] = { NULL }; Ki_HotkeyInfo* s_module_edit_Hotkey_List[] = { NULL };
// list of sections and corresponding hotkey list for pcbnew (used to create an hotkey config file) // list of sections and corresponding hotkey list for pcbnew (used to create an hotkey config file)
struct Ki_HotkeyInfoSectionDescriptor s_Pcbnew_Editor_Hokeys_Descr[] = { { struct Ki_HotkeyInfoSectionDescriptor s_Pcbnew_Editor_Hokeys_Descr[] =
&g_CommonSectionTag, { {
s_Common_Hotkey_List, &g_CommonSectionTag, s_Common_Hotkey_List, "Common keys"
"Common keys" },
}, {
{ &g_BoardEditorSectionTag, s_board_edit_Hotkey_List, "Board editor keys"
& },{
g_BoardEditorSectionTag, &g_ModuleEditSectionTag, s_module_edit_Hotkey_List, "Footprint editor keys"
s_board_edit_Hotkey_List, },{
"Board editor keys" NULL, NULL, NULL
}, { } };
&
g_ModuleEditSectionTag,
s_module_edit_Hotkey_List,
"Footprint editor keys"
}, {
NULL,
NULL, NULL
} };
// list of sections and corresponding hotkey list for the board editor (used to list current hotkeys) // list of sections and corresponding hotkey list for the board editor (used to list current hotkeys)
struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[] = { { struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[] =
&g_CommonSectionTag, { {
s_Common_Hotkey_List, &g_CommonSectionTag,
NULL s_Common_Hotkey_List,
}, { NULL
& },{
g_BoardEditorSectionTag, &g_BoardEditorSectionTag, s_board_edit_Hotkey_List, NULL
s_board_edit_Hotkey_List, },{
NULL NULL, NULL, NULL
}, { } };
NULL,
NULL, NULL
} };
// list of sections and corresponding hotkey list for the footprint editor (used to list current hotkeys) // list of sections and corresponding hotkey list for the footprint editor (used to list current hotkeys)
struct Ki_HotkeyInfoSectionDescriptor s_Module_Editor_Hokeys_Descr[] = { { struct Ki_HotkeyInfoSectionDescriptor
&g_CommonSectionTag, s_Module_Editor_Hokeys_Descr[] =
s_Common_Hotkey_List, { {
NULL &g_CommonSectionTag, s_Common_Hotkey_List, NULL
}, { },{
& &g_ModuleEditSectionTag, s_module_edit_Hotkey_List, NULL
g_ModuleEditSectionTag, },{
s_module_edit_Hotkey_List, NULL, NULL, NULL
NULL } };
}, {
NULL,
NULL, NULL
} };
/***********************************************************/ /***********************************************************/
void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ) void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct )
...@@ -475,22 +460,23 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ...@@ -475,22 +460,23 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
if( m_ID_current_state != ID_TRACK_BUTT ) if( m_ID_current_state != ID_TRACK_BUTT )
break; break;
if( ItemFree ) // no track in progress: if( ItemFree ) // no track in progress:
{ {
TRACK* track = Begin_Route( NULL, DC ); TRACK* track = Begin_Route( NULL, DC );
SetCurItem( track ); SetCurItem( track );
if( track ) if( track )
DrawPanel->m_AutoPAN_Request = true;
}
else if( GetCurItem()->m_Flags & IS_NEW )
{
TRACK* track = Begin_Route( (TRACK*) GetCurItem(), DC );
// SetCurItem() must not write to the msg panel
// because a track info is displayed while moving the mouse cursor
if( track ) // A new segment was created
SetCurItem( track, false );
DrawPanel->m_AutoPAN_Request = true; DrawPanel->m_AutoPAN_Request = true;
} }
else if( GetCurItem()->m_Flags & IS_NEW )
{
TRACK* track = Begin_Route( (TRACK*) GetCurItem(), DC );
// SetCurItem() must not write to the msg panel
// because a track info is displayed while moving the mouse cursor
if( track ) // A new segment was created
SetCurItem( track, false );
DrawPanel->m_AutoPAN_Request = true;
}
break; break;
// Footprint edition: // Footprint edition:
...@@ -605,13 +591,13 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ...@@ -605,13 +591,13 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
switch( HK_Descr->m_Idcommand ) switch( HK_Descr->m_Idcommand )
{ {
case HK_ROTATE_FOOTPRINT: // Rotation case HK_ROTATE_FOOTPRINT: // Rotation
if( module->m_Flags == 0 ) // not currently in edit, prepare undo command if( module->m_Flags == 0 ) // not currently in edit, prepare undo command
SaveCopyInUndoList( module, UR_ROTATED, module->m_Pos ); SaveCopyInUndoList( module, UR_ROTATED, module->m_Pos );
Rotate_Module( DC, module, 900, TRUE ); Rotate_Module( DC, module, 900, TRUE );
break; break;
case HK_FLIP_FOOTPRINT: // move to other side case HK_FLIP_FOOTPRINT: // move to other side
if( module->m_Flags == 0 ) // not currently in edit, prepare undo command if( module->m_Flags == 0 ) // not currently in edit, prepare undo command
SaveCopyInUndoList( module, UR_FLIPPED, module->m_Pos ); SaveCopyInUndoList( module, UR_FLIPPED, module->m_Pos );
Change_Side_Module( module, DC ); Change_Side_Module( module, DC );
......
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