582 |
return |
return |
583 |
self.observers[0].copy_to_clipboard(self.clip) |
self.observers[0].copy_to_clipboard(self.clip) |
584 |
|
|
585 |
|
def on_fix_variable_activate(self,*args): |
586 |
|
_path,_col = self.treeview.get_cursor() |
587 |
|
_instance = self.otank[_path][1] |
588 |
|
self.set_fixed(_instance,True) |
589 |
|
|
590 |
|
def on_free_variable_activate(self,*args): |
591 |
|
_path,_col = self.treeview.get_cursor() |
592 |
|
_instance = self.otank[_path][1] |
593 |
|
self.set_fixed(_instance,False) |
594 |
|
|
595 |
|
def set_fixed(self,instance,val): |
596 |
|
if instance.getType().isRefinedSolverVar(): |
597 |
|
f = instance.isFixed(); |
598 |
|
if (f and not val) or (not f and val): |
599 |
|
instance.setFixed(val) |
600 |
|
self.do_solve_if_auto() |
601 |
|
|
602 |
# -------------------------------------------- |
# -------------------------------------------- |
603 |
# MODULE LIST |
# MODULE LIST |
604 |
|
|
977 |
def fix_activate(self,widget): |
def fix_activate(self,widget): |
978 |
_path,_col = self.treeview.get_cursor() |
_path,_col = self.treeview.get_cursor() |
979 |
_name, _instance = self.otank[_path] |
_name, _instance = self.otank[_path] |
980 |
|
self.set_fixed(_instance,True); |
981 |
_instance.setFixed(True) |
_instance.setFixed(True) |
|
self.reporter.reportNote("Fixed variable %s" % _instance.getName().toString()) |
|
|
self.do_solve_if_auto() |
|
982 |
return 1 |
return 1 |
983 |
|
|
984 |
def free_activate(self,widget): |
def free_activate(self,widget): |
985 |
_path,_col = self.treeview.get_cursor() |
_path,_col = self.treeview.get_cursor() |
986 |
_instance = self.otank[_path][1] |
_instance = self.otank[_path][1] |
987 |
_instance.setFixed(False) |
self.set_fixed(_instance,False) |
|
self.reporter.reportNote("Freed variable %s" % _instance.getName().toString()) |
|
|
self.do_solve_if_auto() |
|
988 |
return 1 |
return 1 |
989 |
|
|
990 |
def plot_activate(self,widget): |
def plot_activate(self,widget): |