Changeset 67b0a99 in sasview for src


Ignore:
Timestamp:
Dec 16, 2016 8:40:27 AM (8 years ago)
Author:
krzywon
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:
f2724b6, b61bd57
Parents:
b742b8b5
Message:

#761: Constrained fit pages are now deleted if they no longer have any data in them when other data sets are deleted. #826: Fixed a bug where dQ smearing option was unavailable for 1D data sets.

Location:
src/sas/sasgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rc8e1996 r67b0a99  
    19501950                    item, _, _ = value 
    19511951                    item.Check(True) 
    1952             self._data_panel.on_remove(None, False) 
    19531952 
    19541953            wx.PostEvent(self, StatusEvent(status="Loading Project file...")) 
     
    19631962                # Reset to a base state 
    19641963                self._on_reset_state() 
     1964                self._data_panel.on_remove(None, False) 
    19651965                # Load the project file 
    19661966                self.load_state(path=path, is_project=True) 
     
    24562456                                                group_id=group_id, 
    24572457                                                action='remove')) 
    2458                 # remove res plot: Todo: improve 
    24592458                wx.CallAfter(self._remove_res_plot, new_plot.id) 
    24602459        self._data_manager.delete_data(data_id=data_id, 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rc8e1996 r67b0a99  
    15281528                        index_data = ((self.qmin_x <= self.data.x) & 
    15291529                                      (self.data.x <= self.qmax_x)) 
    1530                         val = str(len(self.data.x[index_data is True])) 
     1530                        val = str(len([index_data is True])) 
    15311531                        self.Npts_fit.SetValue(val) 
    15321532                    else: 
  • src/sas/sasgui/perspectives/fitting/fitpanel.py

    rc8e1996 r67b0a99  
    189189        # use while-loop, for-loop will not do the job well. 
    190190        while (self.GetPageCount() > 0): 
    191             # delete the first page until no page exists 
    192             page = self.GetPage(0) 
     191            page = self.GetPage(self.GetPageCount() - 1) 
    193192            if self._manager.parent.panel_on_focus == page: 
    194193                self._manager.parent.panel_on_focus = None 
    195194            self._close_helper(selected_page=page) 
    196             self.DeletePage(0) 
     195            self.DeletePage(self.GetPageCount() - 1) 
    197196        # Clear list of names 
    198197        self.fit_page_name = {} 
     
    400399                    temp = self.GetSelection() 
    401400                    self.DeletePage(temp) 
     401            if self.sim_page is not None: 
     402                if len(self.sim_page.model_list) == 0: 
     403                    pos = self.GetPageIndex(self.sim_page) 
     404                    self.SetSelection(pos) 
     405                    self.on_close_page(event=None) 
     406                    temp = self.GetSelection() 
     407                    self.DeletePage(temp) 
     408                    self.sim_page = None 
     409                    self.batch_on = False 
    402410            if self.GetPageCount() == 0: 
    403411                self._manager.on_add_new_page(event=None) 
Note: See TracChangeset for help on using the changeset viewer.