/[ascend]/trunk/pygtk/interface/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/interface/gtkbrowser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 246 by johnpye, Tue Jan 31 16:24:27 2006 UTC revision 249 by johnpye, Wed Feb 1 03:22:11 2006 UTC
# Line 413  class Browser: Line 413  class Browser:
413          self.otank = {} # map path -> (name,value)          self.otank = {} # map path -> (name,value)
414          self.make( self.sim.getName(),self.sim.getModel() )          self.make( self.sim.getName(),self.sim.getModel() )
415          self.maintabs.set_current_page(1);          self.maintabs.set_current_page(1);
416        
417        def do_solve_if_auto(self):
418            if self.is_auto:
419                self.sim.check()
420                self.do_solve()
421            else:
422                self.refreshtree()
423    
424            self.sync_observers()
425                    
426      def do_solve(self):      def do_solve(self):
427          if not self.sim:          if not self.sim:
# Line 685  class Browser: Line 694  class Browser:
694          if _instance.getType().isRefinedSolverVar():          if _instance.getType().isRefinedSolverVar():
695              self.treestore.set_value(_iter,3,"#008800") # set the row green as fixed              self.treestore.set_value(_iter,3,"#008800") # set the row green as fixed
696                    
697          if self.is_auto:          self.do_solve_if_auto()
             self.sim.check()  
             self.do_solve()  
             #self.reporter.reportError("SOLVER completed")  
   
698    
699      def make_children(self, value, piter ):      def make_children(self, value, piter ):
700          if value.isCompound():          if value.isCompound():
# Line 844  class Browser: Line 849  class Browser:
849          _label.set_text(name)          _label.set_text(name)
850          self.maintabs.append_page(_xml.get_widget("observervbox"),_label);          self.maintabs.append_page(_xml.get_widget("observervbox"),_label);
851          self.observers.append(ObserverTab(_xml,name,self))          self.observers.append(ObserverTab(_xml,name,self))
852                
853        def sync_observers(self):
854            for _o in self.observers:
855                _o.sync()
856    
857  #   ------------------------------  #   ------------------------------
858  #   CONTEXT MENU  #   CONTEXT MENU
859    
# Line 890  class Browser: Line 899  class Browser:
899          _name, _instance = self.otank[_path]          _name, _instance = self.otank[_path]
900          _instance.setFixed(True)          _instance.setFixed(True)
901          self.reporter.reportNote("Fixed variable %s" % _instance.getName().toString())          self.reporter.reportNote("Fixed variable %s" % _instance.getName().toString())
902          if self.is_auto:          self.do_solve_if_auto()
             self.sim.check()  
             self.do_solve()  
         else:  
             self.refreshtree()  
903          return 1          return 1
904    
905      def free_activate(self,widget):      def free_activate(self,widget):
# Line 902  class Browser: Line 907  class Browser:
907          _instance = self.otank[_path][1]          _instance = self.otank[_path][1]
908          _instance.setFixed(False)          _instance.setFixed(False)
909          self.reporter.reportNote("Freed variable %s" % _instance.getName().toString())          self.reporter.reportNote("Freed variable %s" % _instance.getName().toString())
910          if self.is_auto:          self.do_solve_if_auto()
             self.sim.check()  
             self.do_solve()  
         else:  
             self.refreshtree()  
911          return 1          return 1
912    
913      def plot_activate(self,widget):      def plot_activate(self,widget):
# Line 949  class Browser: Line 950  class Browser:
950                  self.create_observer()                  self.create_observer()
951              _observer = self.observers[0]              _observer = self.observers[0]
952              _observer.add_instance(_instance)              _observer.add_instance(_instance)
               
 #   ---------------------------------  
 #   WINDOW-LEVEL ACTIONS  
953    
954      def delete_event(self, widget, event, data=None):      def delete_event(self, widget, event, data=None):
955          self.do_quit()            self.do_quit()  

Legend:
Removed from v.246  
changed lines
  Added in v.249

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22