Commit 222c0be7 authored by charras's avatar charras

Fixed bugs 2965646 (Canceling text operation hides text) and 2959930 (Pcbnew...

Fixed bugs 2965646 (Canceling text operation hides text) and 2959930 (Pcbnew inconsistent Layer names sequence)
parent b2bafb0c
......@@ -1113,12 +1113,18 @@ void LIB_COMPONENT::DeleteSelectedItems()
// We *do not* remove the 2 mandatory fields: reference and value
// so skip them (do not remove) if they are flagged selected.
// Skip also not visible items.
// But I think fileds must not be deleted by a block delete command or other global command
// because they are not really graphic items
while( item != drawings.end() )
{
if( item->Type() == COMPONENT_FIELD_DRAW_TYPE )
{
#if 0 // Set to 1 to allows fields deletion on block delete or other global command
LIB_FIELD& field = ( LIB_FIELD& ) *item;
if( (field.m_FieldId == REFERENCE) || (field.m_FieldId == VALUE) )
if( (field.m_FieldId == REFERENCE) || (field.m_FieldId == VALUE) ||
(field.m_Attributs & TEXT_NO_VISIBLE) )
#endif
item->m_Selected = 0;
}
......
......@@ -436,12 +436,17 @@ void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount )
{
CTLs ctl = getCTLs(layer);
bool state = copperCount > 0;
ctl.name->Enable( state );
ctl.checkbox->Enable( state );
ctl.choice->Enable( state );
ctl.name->Show( state );
ctl.checkbox->Show( state );
ctl.choice->Show( state );
setLayerCheckBox( layer, state );
}
// Send an size event to force sizers to be updated,
// because the number of copper layers can have changed.
wxSizeEvent evt_size(m_LayersListPanel->GetSize() );
m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size );
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -146,67 +146,51 @@ class DIALOG_LAYERS_SETUP_BASE : public wxDialog
wxCheckBox* m_MaskFrontCheckBox;
wxStaticText* m_MaskFrontStaticText;
wxTextCtrl* m_FrontName;
wxPanel* m_FrontPanel;
wxCheckBox* m_FrontCheckBox;
wxChoice* m_FrontChoice;
wxTextCtrl* m_Inner2Name;
wxPanel* m_Inner2Panel;
wxCheckBox* m_Inner2CheckBox;
wxChoice* m_Inner2Choice;
wxTextCtrl* m_Inner3Name;
wxPanel* m_Inner3Panel;
wxCheckBox* m_Inner3CheckBox;
wxChoice* m_Inner3Choice;
wxTextCtrl* m_Inner4Name;
wxPanel* m_Inner4Panel;
wxCheckBox* m_Inner4CheckBox;
wxChoice* m_Inner4Choice;
wxTextCtrl* m_Inner5Name;
wxPanel* m_Inner5Panel;
wxCheckBox* m_Inner5CheckBox;
wxChoice* m_Inner5Choice;
wxTextCtrl* m_Inner6Name;
wxPanel* m_Inner6Panel;
wxCheckBox* m_Inner6CheckBox;
wxChoice* m_Inner6Choice;
wxTextCtrl* m_Inner7Name;
wxPanel* m_Inner7Panel;
wxCheckBox* m_Inner7CheckBox;
wxChoice* m_Inner7Choice;
wxTextCtrl* m_Inner8Name;
wxPanel* m_Inner8Panel;
wxCheckBox* m_Inner8CheckBox;
wxChoice* m_Inner8Choice;
wxTextCtrl* m_Inner9Name;
wxPanel* m_Inner9Panel;
wxCheckBox* m_Inner9CheckBox;
wxChoice* m_Inner9Choice;
wxTextCtrl* m_Inner10Name;
wxPanel* m_Inner10Panel;
wxCheckBox* m_Inner10CheckBox;
wxChoice* m_Inner10Choice;
wxTextCtrl* m_Inner11Name;
wxPanel* m_Inner11Panel;
wxCheckBox* m_Inner11CheckBox;
wxChoice* m_Inner11Choice;
wxTextCtrl* m_Inner12Name;
wxPanel* m_Inner12Panel;
wxCheckBox* m_Inner12CheckBox;
wxChoice* m_Inner12Choice;
wxTextCtrl* m_Inner13Name;
wxPanel* m_Inner13Panel;
wxCheckBox* m_Inner13CheckBox;
wxChoice* m_Inner13Choice;
wxTextCtrl* m_Inner14Name;
wxPanel* m_Inner14Panel;
wxCheckBox* m_Inner14CheckBox;
wxChoice* m_Inner14Choice;
wxTextCtrl* m_Inner15Name;
wxPanel* m_Inner15Panel;
wxCheckBox* m_Inner15CheckBox;
wxChoice* m_Inner15Choice;
wxTextCtrl* m_Inner14Name;
wxCheckBox* m_Inner14CheckBox;
wxChoice* m_Inner14Choice;
wxTextCtrl* m_Inner13Name;
wxCheckBox* m_Inner13CheckBox;
wxChoice* m_Inner13Choice;
wxTextCtrl* m_Inner12Name;
wxCheckBox* m_Inner12CheckBox;
wxChoice* m_Inner12Choice;
wxTextCtrl* m_Inner11Name;
wxCheckBox* m_Inner11CheckBox;
wxChoice* m_Inner11Choice;
wxTextCtrl* m_Inner10Name;
wxCheckBox* m_Inner10CheckBox;
wxChoice* m_Inner10Choice;
wxTextCtrl* m_Inner9Name;
wxCheckBox* m_Inner9CheckBox;
wxChoice* m_Inner9Choice;
wxTextCtrl* m_Inner8Name;
wxCheckBox* m_Inner8CheckBox;
wxChoice* m_Inner8Choice;
wxTextCtrl* m_Inner7Name;
wxCheckBox* m_Inner7CheckBox;
wxChoice* m_Inner7Choice;
wxTextCtrl* m_Inner6Name;
wxCheckBox* m_Inner6CheckBox;
wxChoice* m_Inner6Choice;
wxTextCtrl* m_Inner5Name;
wxCheckBox* m_Inner5CheckBox;
wxChoice* m_Inner5Choice;
wxTextCtrl* m_Inner4Name;
wxCheckBox* m_Inner4CheckBox;
wxChoice* m_Inner4Choice;
wxTextCtrl* m_Inner3Name;
wxCheckBox* m_Inner3CheckBox;
wxChoice* m_Inner3Choice;
wxTextCtrl* m_Inner2Name;
wxCheckBox* m_Inner2CheckBox;
wxChoice* m_Inner2Choice;
wxTextCtrl* m_BackName;
wxPanel* m_BackPanel;
wxCheckBox* m_BackCheckBox;
wxChoice* m_BackChoice;
wxStaticText* m_MaskBackName;
......
This diff is collapsed.
......@@ -33,9 +33,9 @@ void Abort_Edit_Pcb_Text( WinEDA_DrawPanel* Panel, wxDC* DC )
{
Panel->ManageCurseur = NULL;
Panel->ForceCloseManageCurseur = NULL;
( (WinEDA_PcbFrame*) Panel->GetParent() )->SetCurItem( NULL );
TEXTE_PCB* TextePcb = (TEXTE_PCB*) Panel->GetScreen()->GetCurItem();
( (WinEDA_PcbFrame*) Panel->GetParent() )->SetCurItem( NULL );
if( TextePcb == NULL ) // Should not occur
return;
......@@ -50,8 +50,8 @@ void Abort_Edit_Pcb_Text( WinEDA_DrawPanel* Panel, wxDC* DC )
SwapData(TextePcb, &s_TextCopy);
TextePcb->Draw( Panel, DC, GR_OR );
TextePcb->m_Flags = 0;
TextePcb->Draw( Panel, DC, GR_OR );
}
......
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