Changeset c8e1996 in sasview for src/sas/sasgui/perspectives/fitting/fitpanel.py
- Timestamp:
- Oct 20, 2016 3:54:06 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 880e845, cf1910f
- Parents:
- 8b645cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpanel.py
re6de6b8 rc8e1996 187 187 """ 188 188 189 # get number of pages190 nop = self.GetPageCount()191 189 # use while-loop, for-loop will not do the job well. 192 while ( nop> 0):190 while (self.GetPageCount() > 0): 193 191 # delete the first page until no page exists 194 192 page = self.GetPage(0) … … 197 195 self._close_helper(selected_page=page) 198 196 self.DeletePage(0) 199 nop = self.GetPageCount()200 197 # Clear list of names 201 198 self.fit_page_name = {} … … 240 237 # close all panels only when svs file opened 241 238 self.close_all() 242 self._manager.mypanels = []243 239 self.sim_page = None 244 240 self.batch_page = None … … 248 244 close page and remove all references to the closed page 249 245 """ 250 nbr_page = self.GetPageCount()251 246 selected_page = self.GetPage(self.GetSelection()) 252 if nbr_page== 1:247 if self.GetPageCount() == 1: 253 248 if selected_page.get_data() is not None: 254 249 if event is not None: … … 293 288 copy a dictionary of model into its own dictionary 294 289 295 :param m_dict: dictionnary made of model name as key and model class290 :param dict: dictionnary made of model name as key and model class 296 291 as value 297 292 """ … … 320 315 if caption == "Const & Simul Fit": 321 316 self.sim_page = SimultaneousFitPage(self, page_finder=page_finder, 322 id= 317 id=wx.ID_ANY, batch_on=False) 323 318 self.sim_page.window_caption = caption 324 319 self.sim_page.window_name = caption … … 397 392 raise ValueError, "Fitpanel delete_data expect list of id" 398 393 else: 399 n = self.GetPageCount()400 394 for page in self.opened_pages.values(): 401 395 pos = self.GetPageIndex(page) … … 441 435 if data_1d_list and data_2d_list: 442 436 # need to warning the user that this batch is a special case 443 from sas.sasgui.perspectives.fitting.fitting_widgets import BatchDataDialog 437 from sas.sasgui.perspectives.fitting.fitting_widgets import \ 438 BatchDataDialog 444 439 dlg = BatchDataDialog(self) 445 440 if dlg.ShowModal() == wx.ID_OK: … … 461 456 page = self.add_empty_page() 462 457 if data_1d_list and not data_2d_list: 463 # only on type of data458 # only on type of data 464 459 page.fill_data_combobox(data_1d_list) 465 460 elif not data_1d_list and data_2d_list: … … 477 472 Add a fitting page on the notebook contained by fitpanel 478 473 479 :param data : data to fit474 :param data_list: data to fit 480 475 481 476 :return panel : page just added for further used.
Note: See TracChangeset
for help on using the changeset viewer.