From 85a6ddfca16f9269cd3eab1649b08ba4cd261fd7 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 25 Nov 2022 15:15:04 -0500 Subject: [PATCH] Properties: fix for wx 3.0 --- common/properties/pg_cell_renderer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/properties/pg_cell_renderer.cpp b/common/properties/pg_cell_renderer.cpp index 33766e2ea1..2fd4321c81 100644 --- a/common/properties/pg_cell_renderer.cpp +++ b/common/properties/pg_cell_renderer.cpp @@ -33,12 +33,17 @@ bool PG_CELL_RENDERER::Render( wxDC &aDC, const wxRect &aRect, const wxPropertyG if( aColumn > 0 ) return wxPGDefaultRenderer::Render( aDC, aRect, aGrid, aProperty, aColumn, aItem, aFlags ); - wxPGCell cell = aGrid->GetUnspecifiedValueAppearance(); - wxString text; int preDrawFlags = aFlags; +#if wxCHECK_VERSION( 3, 1, 0 ) + wxPGCell cell = aGrid->GetUnspecifiedValueAppearance(); aProperty->GetDisplayInfo( aColumn, aItem, aFlags, &text, &cell ); +#else + const wxPGCell* cellPtr = nullptr; + aProperty->GetDisplayInfo( aColumn, aItem, aFlags, &text, &cellPtr ); + wxPGCell cell = *cellPtr; +#endif text = wxControl::Ellipsize( text, aDC, wxELLIPSIZE_MIDDLE, aRect.GetWidth() );