# HG changeset patch
# User Yuki KODAMA <endflow....@gmail.com>
# Date 1256361742 -32400
# Branch stable
# Node ID 6b07d602357aa419ad2ef7991a1e7699b676c296
# Parent  1037a39a6f4194f8cf72ab5d6405021b17b1fdb4
changeset: clear check button before it determines current parent

diff --git a/tortoisehg/hgtk/changeset.py b/tortoisehg/hgtk/changeset.py
--- a/tortoisehg/hgtk/changeset.py
+++ b/tortoisehg/hgtk/changeset.py
@@ -90,27 +90,35 @@
         title = self.get_title()
         if parents:
             if len(parents) == 2:
+                # deferred adding of parent check button
                 if not self.parent_button.parent:
                     self.parent_box.pack_start(gtk.HSeparator(), False, False)
                     self.parent_box.pack_start(self.parent_button,
False, False)
                     self.parent_box.show_all()
+
+                # show parent box
                 self.parent_box.show()
+
+                # uncheck the check button
+                if rev != oldrev:
+                    self.parent_button.handler_block_by_func(
+                            self.parent_toggled)
+                    self.parent_button.set_active(False)
+                    self.parent_button.handler_unblock_by_func(
+                            self.parent_toggled)
+
+                # determine title and current parent
                 if self.diff_other_parent():
                     title += ':' + str(parents[1].rev())
                     parent = parents[1].node()
                 else:
                     title += ':' + str(parents[0].rev())
                     parent = parents[0].node()
-                if rev != oldrev:
-                    # uncheck the check button
-                    self.parent_button.handler_block_by_func(
-                            self.parent_toggled)
-                    self.parent_button.set_active(False)
-                    self.parent_button.handler_unblock_by_func(
-                            self.parent_toggled)
+
                 # clear cache for highlighting parent correctly
                 self.clear_cache()
             else:
+                # hide parent box
                 self.parent_box.hide()
                 parent = parents[0].node()
         else:

Attachment: thg-kuy_rev4744.patch
Description: Binary data

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to