Changeset 1467e1a6 in sasview for sansview/perspectives
- Timestamp:
- Aug 31, 2009 11:26:06 AM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b7a25a7e
- Parents:
- ab62adb
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r30d103a r1467e1a6 1087 1087 break 1088 1088 break 1089 ## save state and post 1090 1091 1092 1089 1090 1093 1091 def _draw_model(self): 1094 1092 """ … … 1401 1399 def _set_dipers_Param(self, event): 1402 1400 """ 1403 Add more item to select user dispersity 1404 """ 1401 respond to self.enable_disp and self.disable_disp radio box. 1402 The dispersity object is reset inside the model into Gaussian. 1403 When the user select yes , this method display a combo box for more selection 1404 when the user selects No,the combo box disappears. 1405 Redraw the model with the default dispersity (Gaussian) 1406 """ 1407 1405 1408 self._reset_dispersity() 1406 1409 1407 1410 if self.model ==None: 1408 1411 self.model_disp.Hide() 1409 1412 self.disp_box.Hide() 1410 1413 self.sizer4_4.Clear(True) 1411 ## save the state of the dispersity 1412 #self.save_current_state() 1414 1413 1415 return 1414 1416 … … 1437 1439 event = PageInfoEvent(page = self) 1438 1440 wx.PostEvent(self.parent, event) 1439 1441 #draw the model with the current dispersity 1440 1442 self._draw_model() 1441 1443 self.sizer4_4.Layout() … … 1506 1508 pass 1507 1509 # Redraw the model 1508 self._draw_model()1510 #self._draw_model() 1509 1511 ## save state into 1510 1512 self.save_current_state() -
sansview/perspectives/fitting/modelpage.py
r25baf31 r1467e1a6 302 302 self.model_view.Disable() 303 303 304 #ToDo:cleanup this mess. resets orient param on 2D when polydis. is on.305 #broken since _set_sizer_gaussian() was removed from the code.306 304 n = self.disp_box.GetCurrentSelection() 307 305 dispersity= self.disp_box.GetClientData(n) 308 306 #TODO:Find a better way to reinitialize the parameters containers 307 # when resetting the page and 2D view is enable 308 #self.set_model_param_sizer(self.model): called here is using a lot 309 #of for loops and redraw the sizer again .How to avoid it? 309 310 self.set_model_param_sizer(self.model) 310 self._set_sizer_dispersion(dispersity)311 311 312 312 if len(self.orientation_params)>0: 313 #recover hidden orient. param.s314 #for item in self.temp:315 # for num in range(len(item)):316 # item[num].Show(True)317 313 for item in self.orientation_params: 318 314 if item[2]!=None: 319 #item[2].Show()320 315 item[2].Enable() 321 322 if self.disp_name.lower() == "array": 316 # same as above why do we have to redraw the sizer of dispersity to get 317 # the appropriate value of parameters containers on reset page? 318 # Reset containers of dispersity parameters for the appropriate dispersity 319 #and model 320 if self.disp_name.lower()in ["array","arraydispersion"]: 323 321 self._set_sizer_arraydispersion() 324 322 else: 325 323 self._set_sizer_dispersion(dispersity) 326 324 if len(self.orientation_params_disp)>0: 327 #for item in self.temp: 328 # for num in range(len(item)): 329 # item[num].Show(True) 330 325 331 326 for item in self.orientation_params_disp: 332 327 if item[2]!=None: 333 #item[2].Show()334 328 item[2].Enable() 329 335 330 self.state.enable2D = copy.deepcopy(self.enable2D) 336 331 self.Layout()
Note: See TracChangeset
for help on using the changeset viewer.