wxGTK: Don't right-align text by default in wxDVC

wxDataViewTextRenderer::SetAlignment didn't consider the posibility of
alignment being -1, causing the align & wxALIGN_RIGHT test to succeed
and the text to be right-aligned if explicit alignment wasn't provided.

This fix is only partial in that it simply does nothing in this case.
The correct thing to do is to determine and apply alignment later, once
it's known, but that's not possible to do on the 3.0 branch while
preserving binary compatibility.

(inspired by a6be5bdae3)
This commit is contained in:
Václav Slavík
2016-10-21 17:56:36 +02:00
parent 34527f7473
commit ed8c3feab3

View File

@@ -2213,6 +2213,9 @@ void wxDataViewTextRenderer::SetAlignment( int align )
return;
#endif
if (align == -1)
return;
// horizontal alignment:
PangoAlignment pangoAlign = PANGO_ALIGN_LEFT;
if (align & wxALIGN_RIGHT)