]> git.saurik.com Git - wxWidgets.git/commitdiff
Ensure AutoComp items with no type will set the item's image index to -1.
authorRobin Dunn <robin@alldunn.com>
Mon, 31 Dec 2007 20:12:42 +0000 (20:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 31 Dec 2007 20:12:42 +0000 (20:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/stc/PlatWX.cpp

index 8de6eae4362455e76d89eeecb7562123624f2bf1..1fc084cb159a7c55dd6aa80270d5f966d34e2a24 100644 (file)
@@ -140,7 +140,7 @@ Font::~Font() {
 
 void Font::Create(const char *faceName, int characterSet,
                   int size, bool bold, bool italic,
-                  bool WXUNUSED(extraFontFlag)) {
+                  bool extraFontFlag) {
     Release();
 
     // The minus one is done because since Scintilla uses SC_SHARSET_DEFAULT
@@ -160,7 +160,7 @@ void Font::Create(const char *faceName, int characterSet,
                     false,
                     stc2wx(faceName),
                     encoding);
-    //font->SetNoAntiAliasing(!extraFontFlag);
+    font->SetNoAntiAliasing(!extraFontFlag);
     id = font;
 }
 
@@ -1234,13 +1234,14 @@ void ListBoxImpl::Append(char *s, int type) {
 void ListBoxImpl::Append(const wxString& text, int type) {
     long count  = GETLB(id)->GetItemCount();
     long itemID  = GETLB(id)->InsertItem(count, wxEmptyString);
+    ling idx = -1;
     GETLB(id)->SetItem(itemID, 1, text);
     maxStrWidth = wxMax(maxStrWidth, text.length());
     if (type != -1) {
         wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
-        long idx = imgTypeMap->Item(type);
-        GETLB(id)->SetItemImage(itemID, idx, idx);
+        idx = imgTypeMap->Item(type);
     }
+    GETLB(id)->SetItemImage(itemID, idx, idx);
 }
 
 void ListBoxImpl::SetList(const char* list, char separator, char typesep) {