Update columns when height changes too
This commit is contained in:
parent
bc146db06d
commit
d105e773a1
|
@ -521,7 +521,6 @@ DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE( SYMBOL_EDIT_FRAME* parent,
|
|||
|
||||
m_initialized = true;
|
||||
m_modified = false;
|
||||
m_width = 0;
|
||||
|
||||
// Connect Events
|
||||
m_grid->Connect( wxEVT_GRID_COL_SORT,
|
||||
|
@ -728,11 +727,11 @@ void DIALOG_LIB_EDIT_PIN_TABLE::adjustGridColumns()
|
|||
|
||||
void DIALOG_LIB_EDIT_PIN_TABLE::OnSize( wxSizeEvent& event )
|
||||
{
|
||||
auto new_size = event.GetSize().GetX();
|
||||
auto new_size = event.GetSize();
|
||||
|
||||
if( m_initialized && m_width != new_size )
|
||||
if( m_initialized && m_size != new_size )
|
||||
{
|
||||
m_width = new_size;
|
||||
m_size = new_size;
|
||||
|
||||
adjustGridColumns();
|
||||
}
|
||||
|
|
|
@ -79,8 +79,7 @@ protected:
|
|||
LIB_SYMBOL* m_part;
|
||||
LIB_PINS m_pins; // a copy of the pins owned by me
|
||||
bool m_modified; ///< true when there are unsaved changes
|
||||
|
||||
int m_width;
|
||||
wxSize m_size;
|
||||
|
||||
PIN_TABLE_DATA_MODEL* m_dataModel;
|
||||
};
|
||||
|
|
|
@ -58,8 +58,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a
|
|||
m_delayedFocusGrid( nullptr ),
|
||||
m_delayedFocusRow( -1 ),
|
||||
m_delayedFocusColumn( -1 ),
|
||||
m_delayedFocusPage( -1 ),
|
||||
m_width( 0 )
|
||||
m_delayedFocusPage( -1 )
|
||||
{
|
||||
// Give a bit more room for combobox editors
|
||||
m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 );
|
||||
|
@ -789,11 +788,11 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
|
||||
void DIALOG_LIB_SYMBOL_PROPERTIES::OnSizeGrid( wxSizeEvent& event )
|
||||
{
|
||||
auto new_size = event.GetSize().GetX();
|
||||
auto new_size = event.GetSize();
|
||||
|
||||
if( new_size != m_width )
|
||||
if( new_size != m_size )
|
||||
{
|
||||
m_width = new_size;
|
||||
m_size = new_size;
|
||||
|
||||
adjustGridColumns();
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
wxString m_delayedErrorMessage;
|
||||
|
||||
wxString m_shownColumns;
|
||||
int m_width;
|
||||
wxSize m_size;
|
||||
|
||||
private:
|
||||
static int m_lastOpenedPage; // To remember the last notebook selection
|
||||
|
|
|
@ -235,7 +235,6 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN
|
|||
Raise();
|
||||
|
||||
m_initialized = true;
|
||||
m_width = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -473,11 +472,11 @@ void DIALOG_PIN_PROPERTIES::adjustGridColumns()
|
|||
|
||||
void DIALOG_PIN_PROPERTIES::OnSize( wxSizeEvent& event )
|
||||
{
|
||||
auto new_size = event.GetSize().GetX();
|
||||
auto new_size = event.GetSize();
|
||||
|
||||
if( m_initialized && m_width != new_size )
|
||||
if( m_initialized && m_size != new_size )
|
||||
{
|
||||
m_width = new_size;
|
||||
m_size = new_size;
|
||||
|
||||
adjustGridColumns();
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ private:
|
|||
int m_delayedFocusColumn;
|
||||
|
||||
int m_originalColWidths[ COL_COUNT ];
|
||||
int m_width;
|
||||
wxSize m_size;
|
||||
bool m_initialized;
|
||||
};
|
||||
|
||||
|
|
|
@ -880,7 +880,7 @@ void DIALOG_SHEET_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
|
||||
void DIALOG_SHEET_PROPERTIES::OnSizeGrid( wxSizeEvent& event )
|
||||
{
|
||||
int new_size = event.GetSize();
|
||||
auto new_size = event.GetSize();
|
||||
|
||||
if( m_size != new_size )
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ private:
|
|||
SCH_SHEET* m_sheet;
|
||||
bool* m_clearAnnotationNewItems;
|
||||
|
||||
int m_width;
|
||||
wxSize m_size;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
wxString m_shownColumns;
|
||||
|
|
|
@ -292,8 +292,6 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
|||
|
||||
m_fields = new FIELDS_GRID_TABLE<SCH_FIELD>( this, aParent, m_fieldsGrid, m_part );
|
||||
|
||||
m_widthFields = 0;
|
||||
m_widthPins = 0;
|
||||
m_delayedFocusRow = REFERENCE_FIELD;
|
||||
m_delayedFocusColumn = FDC_VALUE;
|
||||
m_delayedSelection = true;
|
||||
|
@ -1078,11 +1076,11 @@ void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
|
||||
void DIALOG_SYMBOL_PROPERTIES::OnSizeFieldsGrid( wxSizeEvent& event )
|
||||
{
|
||||
int new_size = event.GetSize().GetX();
|
||||
wxSize new_size = event.GetSize();
|
||||
|
||||
if( m_widthFields != new_size )
|
||||
if( m_fieldsSize != new_size )
|
||||
{
|
||||
m_widthFields = new_size;
|
||||
m_fieldsSize = new_size;
|
||||
|
||||
AdjustFieldsGridColumns();
|
||||
}
|
||||
|
@ -1094,11 +1092,11 @@ void DIALOG_SYMBOL_PROPERTIES::OnSizeFieldsGrid( wxSizeEvent& event )
|
|||
|
||||
void DIALOG_SYMBOL_PROPERTIES::OnSizePinsGrid( wxSizeEvent& event )
|
||||
{
|
||||
int new_size = event.GetSize().GetX();
|
||||
wxSize new_size = event.GetSize();
|
||||
|
||||
if( m_widthPins != new_size )
|
||||
if( m_pinsSize != new_size )
|
||||
{
|
||||
m_widthPins = new_size;
|
||||
m_pinsSize = new_size;
|
||||
|
||||
AdjustPinsGridColumns();
|
||||
}
|
||||
|
|
|
@ -96,8 +96,8 @@ private:
|
|||
SCH_SYMBOL* m_symbol;
|
||||
LIB_SYMBOL* m_part;
|
||||
|
||||
int m_widthFields;
|
||||
int m_widthPins;
|
||||
wxSize m_fieldsSize;
|
||||
wxSize m_pinsSize;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
bool m_delayedSelection;
|
||||
|
|
|
@ -1780,11 +1780,11 @@ void DIALOG_NET_INSPECTOR::adjustListColumns()
|
|||
|
||||
void DIALOG_NET_INSPECTOR::onListSize( wxSizeEvent& aEvent )
|
||||
{
|
||||
int width = aEvent.GetSize().x;
|
||||
auto new_size = aEvent.GetSize();
|
||||
|
||||
if( width != m_width )
|
||||
if( new_size != m_size )
|
||||
{
|
||||
m_width = width;
|
||||
m_size = new_size;
|
||||
adjustListColumns();
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ private:
|
|||
PCB_EDIT_FRAME* m_frame;
|
||||
bool m_in_build_nets_list = false;
|
||||
bool m_filter_change_no_rebuild = false;
|
||||
int m_width = 0;
|
||||
wxSize m_size;
|
||||
|
||||
class DATA_MODEL;
|
||||
wxObjectDataPtr<DATA_MODEL> m_data_model;
|
||||
|
|
Loading…
Reference in New Issue