Commits

Steve Borho committed 49252f6

thgconfig: show 'sync' page before attempting to add a new path

This forces the page to be constructed before we go about mucking with its
model data.

Closes #1330

Comments (0)

Files changed (1)

tortoisehg/hgtk/thgconfig.py

 
     def new_path(self, newpath, alias='new'):
         '''Add a new path to [paths], give default name, focus'''
+        # This method may be called from hgtk.sync, so ensure page is visible
+        self.show_page('sync')
         i = self.pathdata.insert_before(None, None)
         safepath = url.hidepassword(newpath)
         if alias in [row[0] for row in self.pathdata]:
                 self.pathdata.get_path(i),
                 self.pathtree.get_column(0))
         self.refresh_path_list()
-        # This method may be called from hgtk.sync, so ensure page is visible
-        self.show_page('sync')
         self.dirty_event()
 
     def dirty_event(self, *args):