1
0
forked from pool/wxWidgets-3_2

Accepting request 902378 from home:1Antoine1:branches:X11:wxWidgets

- Add wxWidgets-3.1.5-fix-wxIcon-wxDVC-columns.patch (boo#1187712).

OBS-URL: https://build.opensuse.org/request/show/902378
OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/wxWidgets-3_2?expand=0&rev=86
This commit is contained in:
Jan Engelhardt 2021-06-25 15:13:23 +00:00 committed by Git OBS Bridge
parent 4d5a03886a
commit 69d52387a1
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From c817a434d8d0d13a10f936af1eef0d8ffecb8069 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= <vaclav@slavik.io>
Date: Mon, 7 Jun 2021 16:15:53 +0200
Subject: [PATCH] Fix wxIcon wxDVC columns under wxGTK
b376d1402bdc48614888704cf191f82a630d93c0 accidentally broke columns
with wxIcon type. Contrary to that commit's assumption, operator<<
cannot convert wxIcon to wxBitmap and asserts:
src/common/bmpbase.cpp(33): assert "variant.GetType() == "wxBitmap"" failed in operator<<().
Fixed by restoring explicit conversion.
---
src/gtk/dataview.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
index 8ffa7b7b3b5..767334e0043 100644
--- a/src/gtk/dataview.cpp
+++ b/src/gtk/dataview.cpp
@@ -2562,8 +2562,16 @@ wxDataViewBitmapRenderer::wxDataViewBitmapRenderer( const wxString &varianttype,
bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
{
wxBitmap bitmap;
- if (value.GetType() == wxS("wxBitmap") || value.GetType() == wxS("wxIcon"))
+ if (value.GetType() == wxS("wxBitmap"))
+ {
bitmap << value;
+ }
+ else if (value.GetType() == wxS("wxIcon"))
+ {
+ wxIcon icon;
+ icon << value;
+ bitmap.CopyFromIcon(icon);
+ }
#ifdef __WXGTK3__
WX_CELL_RENDERER_PIXBUF(m_renderer)->Set(bitmap);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 25 10:41:40 UTC 2021 - Antoine Belvire <antoine.belvire@opensuse.org>
- Add wxWidgets-3.1.5-fix-wxIcon-wxDVC-columns.patch (boo#1187712).
-------------------------------------------------------------------
Sun Jun 6 11:09:48 UTC 2021 - Antoine Belvire <antoine.belvire@opensuse.org>

View File

@ -82,6 +82,7 @@ Source5: wxWidgets-3_2-rpmlintrc
# identify and backport wxPython fixes to wxWidgets.
Source6: wxpython-mkdiff.sh
Patch1: soversion.diff
Patch2: wxWidgets-3.1.5-fix-wxIcon-wxDVC-columns.patch
BuildRequires: autoconf
BuildRequires: cppunit-devel
BuildRequires: gcc-c++