diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index f364677c7b..c0581dd679 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -231,12 +231,12 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int // eventually ellipsize the text so that it fits the field width - wxEllipsizeMode ellmode = (wxEllipsizeMode)-1; + wxEllipsizeMode ellmode = wxELLIPSIZE_NONE; if (HasFlag(wxSTB_ELLIPSIZE_START)) ellmode = wxELLIPSIZE_START; else if (HasFlag(wxSTB_ELLIPSIZE_MIDDLE)) ellmode = wxELLIPSIZE_MIDDLE; else if (HasFlag(wxSTB_ELLIPSIZE_END)) ellmode = wxELLIPSIZE_END; - if (ellmode == (wxEllipsizeMode)-1) + if (ellmode == wxELLIPSIZE_NONE) { // if we have the wxSTB_SHOW_TIPS we must set the ellipsized flag even if // we don't ellipsize the text but just truncate it @@ -267,7 +267,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int // draw the text dc.DrawText(text, xpos, ypos); - if (ellmode == (wxEllipsizeMode)-1) + if (ellmode == wxELLIPSIZE_NONE) dc.DestroyClippingRegion(); } diff --git a/src/msw/statusbar.cpp b/src/msw/statusbar.cpp index 52ed30fa79..ad9b4eff96 100644 --- a/src/msw/statusbar.cpp +++ b/src/msw/statusbar.cpp @@ -287,12 +287,12 @@ void wxStatusBar::DoUpdateStatusText(int nField) wxString text = GetStatusText(nField); // do we need to ellipsize this string? - wxEllipsizeMode ellmode = (wxEllipsizeMode)-1; + wxEllipsizeMode ellmode = wxELLIPSIZE_NONE; if (HasFlag(wxSTB_ELLIPSIZE_START)) ellmode = wxELLIPSIZE_START; else if (HasFlag(wxSTB_ELLIPSIZE_MIDDLE)) ellmode = wxELLIPSIZE_MIDDLE; else if (HasFlag(wxSTB_ELLIPSIZE_END)) ellmode = wxELLIPSIZE_END; - if (ellmode == (wxEllipsizeMode)-1) + if (ellmode == wxELLIPSIZE_NONE) { // if we have the wxSTB_SHOW_TIPS we must set the ellipsized flag even if // we don't ellipsize the text but just truncate it