From 5c6c60def427ee763e965a9588a6b2056a73c26c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 21 Dec 2017 09:06:57 +0100 Subject: [PATCH] Remove custom font from lib_table_grid Fixes: lp:1738617 * https://bugs.launchpad.net/kicad/+bug/1738617 --- include/lib_table_grid.h | 41 ---------------------------------------- 1 file changed, 41 deletions(-) diff --git a/include/lib_table_grid.h b/include/lib_table_grid.h index 22ab197254..3e5aded90e 100644 --- a/include/lib_table_grid.h +++ b/include/lib_table_grid.h @@ -187,47 +187,6 @@ public: default: return wxEmptyString; } - } - - /** - * Customize the appearance of LIB_TABLE_ROW entries - * - If not enabled, greyed out and italic - */ - virtual wxGridCellAttr* GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override - { - auto* attr = wxGridTableBase::GetAttr( aRow, aCol, aKind ); - - if( aRow < (int) size() ) - { - if( !attr ) - { - attr = new wxGridCellAttr(); - } - - wxFont font; - - if( attr->HasFont() ) - { - font = attr->GetFont(); - } - - LIB_TABLE_ROW* r = at( (size_t) aRow ); - - if( r && r->GetIsEnabled() ) - { - font.SetStyle( wxFONTSTYLE_NORMAL ); - attr->SetTextColour( COLOUR_ROW_ENABLED ); - } - else - { - font.SetStyle( wxFONTSTYLE_ITALIC ); - attr->SetTextColour( COLOUR_ROW_DISABLED ); - } - - attr->SetFont( font ); - } - - return attr; } protected: