OSDN Git Service

crystaledit: fix flickering when replacing text
authorsdottaka <sdottaka@users.sourceforge.net>
Sat, 20 Jun 2015 07:46:38 +0000 (16:46 +0900)
committersdottaka <sdottaka@users.sourceforge.net>
Sat, 20 Jun 2015 07:46:38 +0000 (16:46 +0900)
--HG--
branch : stable

Externals/crystaledit/editlib/memcombo.cpp

index d58fc04..41aeb1c 100644 (file)
@@ -125,6 +125,7 @@ Fill (LPCTSTR text)
 {
   if (text && *text)
     {
+      int ol = GetCount ();
       int nPos = FindStringExact (-1, text);
       if (nPos  != CB_ERR)
         DeleteString (nPos);
@@ -132,7 +133,8 @@ Fill (LPCTSTR text)
       int l = GetCount ();
       if (l > REMEMBER_COUNT)
         DeleteString (--l);
-      SetComboBoxHeight (*this);
+      if (ol != l)
+        SetComboBoxHeight (*this);
       SetComboBoxWidth (*this);
       SetCurSel (0);
       if (!m_sGroup.IsEmpty ())