]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxDataViewRenderer::GetEllipsizeMode() for kDataBrowserTruncateTextMiddle.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Nov 2009 15:03:39 +0000 (15:03 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Nov 2009 15:03:39 +0000 (15:03 +0000)
The value of this constant is 0 so don't test for it using operator "&", it's
just the default if no others are specified.

Fixes assert on startup of the dataview sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/dataview.cpp

index ebac02b0795f78e9139f1c458615fd26d607eb52..f64e35c4307a77ea3ca9d8e91953125348e3afa5 100644 (file)
@@ -2283,14 +2283,11 @@ wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
         return wxELLIPSIZE_NONE;
     if ( flags & kDataBrowserTruncateTextAtStart )
         return wxELLIPSIZE_START;
-    if ( flags & kDataBrowserTruncateTextMiddle )
-        return wxELLIPSIZE_MIDDLE;
     if ( flags & kDataBrowserTruncateTextAtEnd )
         return wxELLIPSIZE_END;
 
-    wxFAIL_MSG( "unknown flags" );
-
-    return wxELLIPSIZE_NONE;
+    // kDataBrowserTruncateTextMiddle == 0 so there is no need to test for it
+    return wxELLIPSIZE_MIDDLE;
 }
 
 void wxDataViewRenderer::SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr)