From 1188cd433bb76ffaa21a756e95299069c4a53d2e Mon Sep 17 00:00:00 2001 From: Blair Bonnett Date: Sun, 9 Nov 2014 14:24:37 -0500 Subject: [PATCH] Fix wxWidgets debug assertion for wxTextCtrl::IsSingleLine() in GTK. * Fix assertions in Eeschema when editing net labels, electronic rules check, and plotting. * Fix assertion when opening PCB calculator. * Fix assertions in Pcbnew when changing footprints in footprint properties dialog and adding or editing text. --- eeschema/dialogs/dialog_edit_label_base.cpp | 1 - eeschema/dialogs/dialog_edit_label_base.fbp | 2 +- eeschema/dialogs/dialog_erc_base.cpp | 1 - eeschema/dialogs/dialog_erc_base.fbp | 2 +- eeschema/dialogs/dialog_plot_schematic_base.cpp | 1 - eeschema/dialogs/dialog_plot_schematic_base.fbp | 2 +- pcb_calculator/dialogs/pcb_calculator_frame_base.cpp | 1 - pcb_calculator/dialogs/pcb_calculator_frame_base.fbp | 2 +- pcbnew/dialogs/dialog_exchange_modules_base.cpp | 1 - pcbnew/dialogs/dialog_exchange_modules_base.fbp | 2 +- pcbnew/dialogs/dialog_pcb_text_properties_base.cpp | 1 - pcbnew/dialogs/dialog_pcb_text_properties_base.fbp | 2 +- 12 files changed, 6 insertions(+), 12 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_label_base.cpp b/eeschema/dialogs/dialog_edit_label_base.cpp index c46b70895b..545bf09211 100644 --- a/eeschema/dialogs/dialog_edit_label_base.cpp +++ b/eeschema/dialogs/dialog_edit_label_base.cpp @@ -37,7 +37,6 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 ); m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER ); - m_textLabelMultiLine->SetMaxLength( 0 ); m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) ); bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 ); diff --git a/eeschema/dialogs/dialog_edit_label_base.fbp b/eeschema/dialogs/dialog_edit_label_base.fbp index 1d8f475b0e..8874a2f0cf 100644 --- a/eeschema/dialogs/dialog_edit_label_base.fbp +++ b/eeschema/dialogs/dialog_edit_label_base.fbp @@ -327,7 +327,7 @@ 0 - 0 + 0 -1,60 diff --git a/eeschema/dialogs/dialog_erc_base.cpp b/eeschema/dialogs/dialog_erc_base.cpp index a204d6e0c0..3f62099ffa 100644 --- a/eeschema/dialogs/dialog_erc_base.cpp +++ b/eeschema/dialogs/dialog_erc_base.cpp @@ -80,7 +80,6 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 5 ); m_MessagesList = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_MessagesList->SetMaxLength( 0 ); bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 ); diff --git a/eeschema/dialogs/dialog_erc_base.fbp b/eeschema/dialogs/dialog_erc_base.fbp index 554b236564..b5ed65fbe8 100644 --- a/eeschema/dialogs/dialog_erc_base.fbp +++ b/eeschema/dialogs/dialog_erc_base.fbp @@ -1032,7 +1032,7 @@ 0 - 0 + 0 -1,-1 diff --git a/eeschema/dialogs/dialog_plot_schematic_base.cpp b/eeschema/dialogs/dialog_plot_schematic_base.cpp index d1b5fdb3a0..38ae92464f 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_base.cpp @@ -146,7 +146,6 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind bSizer4->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_MessagesBox->SetMaxLength( 0 ); m_MessagesBox->SetMinSize( wxSize( -1,80 ) ); bSizer4->Add( m_MessagesBox, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_base.fbp b/eeschema/dialogs/dialog_plot_schematic_base.fbp index 9648366f91..280cd023ae 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_base.fbp @@ -1799,7 +1799,7 @@ 0 - 0 + 0 -1,80 diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index c20b6b5080..ce70c49846 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -1140,7 +1140,6 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bMiddleSizerAtt->Add( m_staticTextAttMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_Attenuator_Messages = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_Attenuator_Messages->SetMaxLength( 0 ); bMiddleSizerAtt->Add( m_Attenuator_Messages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index da5cd391c3..e66ca96c35 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -16799,7 +16799,7 @@ 0 - 0 + 0 diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.cpp b/pcbnew/dialogs/dialog_exchange_modules_base.cpp index c8cbddaa0d..4fb582e87f 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.cpp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.cpp @@ -87,7 +87,6 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_WinMessages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_WinMessages->SetMaxLength( 0 ); m_WinMessages->SetMinSize( wxSize( 450,300 ) ); bMainSizer->Add( m_WinMessages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.fbp b/pcbnew/dialogs/dialog_exchange_modules_base.fbp index 99ee9a7b1c..38acfe7e23 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.fbp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.fbp @@ -1219,7 +1219,7 @@ 0 - 0 + 0 450,300 diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp index d04c149bcf..7473eb8191 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp @@ -26,7 +26,6 @@ DIALOG_PCB_TEXT_PROPERTIES_BASE::DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* pare bSizer9->Add( m_TextLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_TextContentCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_TextContentCtrl->SetMaxLength( 0 ); m_TextContentCtrl->SetToolTip( _("Enter the text placed on selected layer.") ); m_TextContentCtrl->SetMinSize( wxSize( 400,60 ) ); diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp index 18ad8d4662..22b5ab4529 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp @@ -218,7 +218,7 @@ 0 - 0 + 0 400,60