Index: sansview/perspectives/fitting/fitpage1D.py
===================================================================
--- sansview/perspectives/fitting/fitpage1D.py	(revision 08b9c6c8ba9d8d6475482f93cc09a6829f108e9a)
+++ sansview/perspectives/fitting/fitpage1D.py	(revision db709e4fbeac91ce621c73623d3d788bd09e2c2c)
@@ -534,4 +534,5 @@
             and the reset model according to paramaters changes
         """
+        print "went here",len(self.parameters) ,self.model
         if len(self.parameters) !=0 and self.model !=None:
             for item in self.parameters:
@@ -546,17 +547,32 @@
                      wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
                             "Drawing  Error:wrong value entered : %s"% sys.exc_value))
-            for item in self.fixed_param:
-                try:
+           
+                is_modified = False
+                if self.xmin.IsModified():
+                    is_modified = True
+                if self.xmax.IsModified():
+                    is_modified = True
+                
+                try: 
                     
-                    name=str(item[0])
-                    value= float(item[1].GetValue())
-                    self.model.setParam(name,value) 
+                    if item[1].IsModified() or is_modified:
+                        print str(item[0].GetLabelText()),item[1].IsModified()
+                        item[1].SetModified(False)
+                        name=str(item[0].GetLabelText())
+                        value= float(item[1].GetValue())
+                        self.model.setParam(name,value)
+                        self.xmin.SetModified(False)
+                        self.xmax.SetModified(False)
+                        is_modified=False
+                        
+                        self.manager.redraw_model(
+                        float(self.xmin.GetValue()),
+                        float(self.xmax.GetValue())  )    
+            
                 except:
-                    raise 
-                    wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
-                            "Drawing  Error:wrong value entered : %s"% sys.exc_value))
-            self.manager.redraw_model(float(self.xmin.GetValue())\
-                                               ,float(self.xmax.GetValue()))      
-                     
+                     wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
+                            "Model Drawing  Error:wrong value entered : %s"% sys.exc_value))
+            
+           
     def select_all_param(self,event): 
         """
Index: sansview/perspectives/fitting/fitpage2D.py
===================================================================
--- sansview/perspectives/fitting/fitpage2D.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
+++ sansview/perspectives/fitting/fitpage2D.py	(revision db709e4fbeac91ce621c73623d3d788bd09e2c2c)
@@ -498,14 +498,32 @@
         if len(self.parameters) !=0 and self.model !=None:
             for item in self.parameters:
-                try:
-                     name=str(item[0].GetLabelText())
-                     value= float(item[1].GetValue())
-                     self.model.setParam(name,value) 
+                
+                is_modified = False
+                if self.xmin.IsModified():
+                    is_modified = True
+                if self.xmax.IsModified():
+                    is_modified = True
+                
+                try: 
+                    
+                    if item[1].IsModified() or is_modified:
+                        print str(item[0].GetLabelText()),item[1].IsModified()
+                        item[1].SetModified(False)
+                        name=str(item[0].GetLabelText())
+                        value= float(item[1].GetValue())
+                        self.model.setParam(name,value)
+                        self.xmin.SetModified(False)
+                        self.xmax.SetModified(False)
+                        is_modified=False
+                        
+                        self.manager.redraw_model(
+                        float(self.xmin.GetValue()),
+                        float(self.xmax.GetValue())  )    
+            
                 except:
                      wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
-                            "Drawing  Error:wrong value entered : %s"% sys.exc_value))
-            self.manager.redraw_model(float(self.xmin.GetValue())\
-                                               ,float(self.xmax.GetValue()))      
-                     
+                            "Model Drawing  Error:wrong value entered : %s"% sys.exc_value))
+            
+           
     def select_all_param(self,event): 
         """
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision d74d751c5a01f3860d1cae4cfa3d9268e2071c25)
+++ sansview/perspectives/fitting/fitting.py	(revision db709e4fbeac91ce621c73623d3d788bd09e2c2c)
@@ -586,6 +586,6 @@
         description=model.description
         #self.fit_panel.add_model_page(model,description,name)  
-        
-        self.draw_model(model=model,name=name,enable2D=self.enable_model2D)
+    
+        self.draw_model(model=model,name=name)
         
     def draw_model(self,model,name ,description=None,enable1D=True, enable2D=False,qmin=None, qmax=None,qstep=None):
@@ -692,37 +692,5 @@
             self.calc_thread.ready(2.5)
            
-                
-                
-    def H_draw_model2D(self,model,description=None, enable2D=False,qmin=None,qmax=None, qstep=None):
-        if qmin==None:
-            qmin= -0.05
-        if qmax==None:
-            qmax= 0.05
-        if qstep ==None:
-            qstep =0.001
-        x = numpy.arange(qmin,qmax, qstep)
-        y = numpy.arange(qmin,qmax,qstep)
-        lx = len(self.x)
-        if enable2D:
-            data=numpy.zeros([len(x),len(y)])
-            for i in range(len(x)):
-                for j in range(len(x)):
-                    try:
-                        data[i][j]=model.runXY([j,i])
-                    except:
-                         wx.PostEvent(self.parent, StatusEvent(status="\
-                        Model 2D cannot be plot %g %s %s" %(data[i][j],model.name, sys.exc_value)))
-           
-    
-    def on_draw_model2D(self, event):
-        """
-             plot view model 2D
-        """
-        
-        if self.enable_model2D== True:
-            self.enable_model2D=False
-        else:
-            self.enable_model2D=True
-        print "self.enable_model2D",self.enable_model2D
+   
 if __name__ == "__main__":
     i = Plugin()
Index: sansview/perspectives/fitting/model_thread.py
===================================================================
--- sansview/perspectives/fitting/model_thread.py	(revision d74d751c5a01f3860d1cae4cfa3d9268e2071c25)
+++ sansview/perspectives/fitting/model_thread.py	(revision db709e4fbeac91ce621c73623d3d788bd09e2c2c)
@@ -136,8 +136,8 @@
             center_x=0
             center_y=0
-        print "center_x , center_y",center_x , center_y
-        print "x ",len(x)
-        print "y", y
-        print "int(len(self.x)/2)",int(len(self.x)/2)
+        #print "center_x , center_y",center_x , center_y
+        #print "x ",len(x)
+        #print "y", y
+        #print "int(len(self.x)/2)",int(len(self.x)/2)
         self.starttime = time.time()
         lx = len(self.x)
Index: sansview/perspectives/fitting/modelpage.py
===================================================================
--- sansview/perspectives/fitting/modelpage.py	(revision d74d751c5a01f3860d1cae4cfa3d9268e2071c25)
+++ sansview/perspectives/fitting/modelpage.py	(revision db709e4fbeac91ce621c73623d3d788bd09e2c2c)
@@ -366,20 +366,4 @@
             # Flag to register when a parameter has changed.
             is_modified = False
-            for item in self.parameters:
-                try:
-                     name=str(item[0].GetLabelText())
-                     value= float(item[1].GetValue())
-                     # If the value of the parameter has changed,
-                     # update the model and set the is_modified flag
-                     if value != self.model.getParam(name):
-                         self.model.setParam(name,value)
-                         is_modified = True
-                except:
-                     wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
-                            "Model Drawing  Error:wrong value entered : %s"% sys.exc_value))
-            
-            # Here we should check whether the boundaries have been modified.
-            # If qmin and qmax have been modified, update qmin and qmax and 
-            # set the is_modified flag to True
             if float(self.xmin.GetValue()) != self.qmin:
                 self.qmin = float(self.xmin.GetValue())
@@ -388,10 +372,29 @@
                 self.qmax = float(self.xmax.GetValue())
                 is_modified = True
-            
-            if is_modified:
-                self.manager.draw_model(self.model, self.model.name, 
+            for item in self.parameters:
+                try: 
+                    
+                    if item[1].IsModified() or is_modified:
+                        print str(item[0].GetLabelText()),item[1].IsModified()
+                        item[1].SetModified(False)
+                        name=str(item[0].GetLabelText())
+                        value= float(item[1].GetValue())
+                        self.model.setParam(name,value)
+
+                        is_modified=False
+                        print "self.enable2d",self.enable2D
+                        self.manager.draw_model(self.model, self.model.name, 
                                         qmin=self.qmin, qmax=self.qmax,
                                         enable2D=self.enable2D)
-            #self.manager.draw_model(self,model,description=None,
+                
+                    
+                except:
+                     wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
+                            "Model Drawing  Error:wrong value entered : %s"% sys.exc_value))
+            
+            # Here we should check whether the boundaries have been modified.
+            # If qmin and qmax have been modified, update qmin and qmax and 
+            # set the is_modified flag to True
+          
             # enable1D=True,qmin=None,qmax=None, qstep=None)
             
