Loading eeschema/dialogs/dialog_edit_label.cpp +11 −14 Original line number Diff line number Diff line Loading @@ -92,24 +92,18 @@ void DialogLabelEditor::InitDialog() break; } unsigned MINTEXTWIDTH = 40; // M's are big characters, a few establish a lot of width int MINTEXTWIDTH = 40; // M's are big characters, a few establish a lot of width if( m_CurrentText->m_Text.Length() < MINTEXTWIDTH ) { wxString textWidth; textWidth.Append( 'M', MINTEXTWIDTH ); EnsureTextCtrlWidth( m_textLabel, &textWidth ); } else if ( !multiLine ) int max_len = 0; if ( !multiLine ) { EnsureTextCtrlWidth( m_textLabel ); max_len =m_CurrentText->m_Text.Length(); } else { // calculate the length of the biggest line // we cannot use the length of the entire text that has no meaning int max_len = 0; int curr_len = 0; int curr_len = MINTEXTWIDTH; int imax = m_CurrentText->m_Text.Len(); for( int count = 0; count < imax; count++ ) { Loading @@ -125,10 +119,13 @@ void DialogLabelEditor::InitDialog() max_len = curr_len; } } } if( max_len < MINTEXTWIDTH ) max_len = MINTEXTWIDTH; wxString textWidth; textWidth.Append( 'M', max_len ); textWidth.Append( 'M', MINTEXTWIDTH ); EnsureTextCtrlWidth( m_textLabel, &textWidth ); } // Set validators m_TextOrient->SetSelection( m_CurrentText->GetSchematicTextOrientation() ); Loading eeschema/dialogs/dialog_edit_label_base.cpp +2 −1 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -107,4 +107,5 @@ DialogLabelEditor_Base::~DialogLabelEditor_Base() m_textLabelMultiLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnCancelClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnOkClick ), NULL, this ); } eeschema/dialogs/dialog_edit_label_base.fbp +455 −401 File changed.Preview size limit exceeded, changes collapsed. Show changes eeschema/dialogs/dialog_edit_label_base.h +5 −4 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -60,6 +60,7 @@ class DialogLabelEditor_Base : public wxDialog public: DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 359,347 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DialogLabelEditor_Base(); Loading eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxSize( 350,-1 ), wxDefaultSize ); wxBoxSizer* m_mainSizer; m_mainSizer = new wxBoxSizer( wxVERTICAL ); Loading @@ -21,6 +21,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent wxFlexGridSizer* fgSizer1; fgSizer1 = new wxFlexGridSizer( 4, 3, 0, 0 ); fgSizer1->AddGrowableCol( 1 ); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); Loading Loading @@ -85,7 +86,6 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent this->SetSizer( m_mainSizer ); this->Layout(); m_mainSizer->Fit( this ); this->Centre( wxBOTH ); } Loading Loading
eeschema/dialogs/dialog_edit_label.cpp +11 −14 Original line number Diff line number Diff line Loading @@ -92,24 +92,18 @@ void DialogLabelEditor::InitDialog() break; } unsigned MINTEXTWIDTH = 40; // M's are big characters, a few establish a lot of width int MINTEXTWIDTH = 40; // M's are big characters, a few establish a lot of width if( m_CurrentText->m_Text.Length() < MINTEXTWIDTH ) { wxString textWidth; textWidth.Append( 'M', MINTEXTWIDTH ); EnsureTextCtrlWidth( m_textLabel, &textWidth ); } else if ( !multiLine ) int max_len = 0; if ( !multiLine ) { EnsureTextCtrlWidth( m_textLabel ); max_len =m_CurrentText->m_Text.Length(); } else { // calculate the length of the biggest line // we cannot use the length of the entire text that has no meaning int max_len = 0; int curr_len = 0; int curr_len = MINTEXTWIDTH; int imax = m_CurrentText->m_Text.Len(); for( int count = 0; count < imax; count++ ) { Loading @@ -125,10 +119,13 @@ void DialogLabelEditor::InitDialog() max_len = curr_len; } } } if( max_len < MINTEXTWIDTH ) max_len = MINTEXTWIDTH; wxString textWidth; textWidth.Append( 'M', max_len ); textWidth.Append( 'M', MINTEXTWIDTH ); EnsureTextCtrlWidth( m_textLabel, &textWidth ); } // Set validators m_TextOrient->SetSelection( m_CurrentText->GetSchematicTextOrientation() ); Loading
eeschema/dialogs/dialog_edit_label_base.cpp +2 −1 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -107,4 +107,5 @@ DialogLabelEditor_Base::~DialogLabelEditor_Base() m_textLabelMultiLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnCancelClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnOkClick ), NULL, this ); }
eeschema/dialogs/dialog_edit_label_base.fbp +455 −401 File changed.Preview size limit exceeded, changes collapsed. Show changes
eeschema/dialogs/dialog_edit_label_base.h +5 −4 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -60,6 +60,7 @@ class DialogLabelEditor_Base : public wxDialog public: DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 359,347 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DialogLabelEditor_Base(); Loading
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxSize( 350,-1 ), wxDefaultSize ); wxBoxSizer* m_mainSizer; m_mainSizer = new wxBoxSizer( wxVERTICAL ); Loading @@ -21,6 +21,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent wxFlexGridSizer* fgSizer1; fgSizer1 = new wxFlexGridSizer( 4, 3, 0, 0 ); fgSizer1->AddGrowableCol( 1 ); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); Loading Loading @@ -85,7 +86,6 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent this->SetSizer( m_mainSizer ); this->Layout(); m_mainSizer->Fit( this ); this->Centre( wxBOTH ); } Loading