Revision: 6524
Author: nogu.dev
Date: Sun Jul 18 02:27:43 2010
Log: * qt4/immodule/candidatetablewindow.cpp
  - (CandidateTableWindow::updateView): Fix bug in button state.
http://code.google.com/p/uim/source/detail?r=6524

Modified:
 /trunk/qt4/immodule/candidatetablewindow.cpp

=======================================
--- /trunk/qt4/immodule/candidatetablewindow.cpp        Sun Jul 18 02:27:34 2010
+++ /trunk/qt4/immodule/candidatetablewindow.cpp        Sun Jul 18 02:27:43 2010
@@ -209,7 +209,7 @@
         for (int j = 0; j < TABLE_NR_COLUMNS; j++) {
             KeyButton *button = buttonArray[i][j];
             button->setIndex(-1);
-            button->setEnabled(true);
+            button->setEnabled(false);
             button->setText("");
         }
     }
@@ -224,8 +224,8 @@
             }
             KeyButton *button = buttonArray[i][j];
             if (index - delta >= ncandidates) {
-                if (button->text().isEmpty())
-                    button->setEnabled(false);
+                if (!button->text().isEmpty())
+                    button->setEnabled(true);
                 continue;
             }
             int candidateIndex = displayLimit * newpage + index - delta;
@@ -242,8 +242,7 @@
                 // '&' shouldn't be used as the shortcut key
                 b->setText(candString.replace('&', "&&"));
                 b->setIndex(candidateIndex);
-            } else {
-                button->setEnabled(false);
+                b->setEnabled(true);
             }
             index++;
         }

Reply via email to