Don't not set orientation when hide lookup table to improve UI performance.
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 17 May 2012 15:08:14 +0000 (11:08 -0400)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 17 May 2012 15:08:14 +0000 (11:08 -0400)
BUG=http://code.google.com/p/ibus/issues/detail?id=1461
TEST=manually

Review URL: https://codereview.appspot.com/6203085

ui/gtk3/candidatepanel.vala

index a029e8f..0cf3c57 100644 (file)
@@ -155,9 +155,15 @@ public class CandidatePanel : Gtk.HBox{
 
             orientation = (IBus.Orientation)table.get_orientation();
         }
+
         m_candidate_area.set_candidates(candidates, cursor_in_page, show_cursor);
         set_labels(labels);
-        set_orientation(orientation);
+
+        if (table != null) {
+            // Do not change orientation if table is null to avoid recreate
+            // candidates area.
+            set_orientation(orientation);
+        }
 
         if (candidates.length != 0)
             m_candidate_area.show_all();