Changeset 8898558b in sasview for src


Ignore:
Timestamp:
Nov 17, 2016 11:54:41 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:
db5294e
Parents:
377c19a2
Message:

#795: Added a check to see if model names are from sasmodels in SasView? v4+ or from v3.x.y. Conversion tool is skipped if from v4 or later.

Location:
src/sas/sasgui/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rb4fc0f9 r8898558b  
    11571157            category_pos = int(state.categorycombobox) 
    11581158        except: 
    1159             if state.formfactorcombobox is not None: 
     1159            if state.formfactorcombobox is not None \ 
     1160                    and not state._is_sasmodels(): 
    11601161                state._convert_to_sasmodels() 
    11611162            state.categorycombobox = unicode(state.categorycombobox) 
  • src/sas/sasgui/perspectives/fitting/pagestate.py

    r377c19a2 r8898558b  
    2525from lxml import etree 
    2626 
     27from sasmodels import convert 
    2728import sasmodels.weights 
    2829 
     
    356357        return obj 
    357358 
     359    def _is_sasmodels(self): 
     360        """ 
     361        A check to see if the loaded save state was saved in SasView v4_0+ 
     362        :return: None 
     363        """ 
     364        newname = convert._conversion_target(self.formfactorcombobox) 
     365        if newname == None: 
     366            return True 
     367        else: 
     368            return False 
     369 
    358370    def _convert_to_sasmodels(self): 
    359371        """ 
     
    362374        :return: None 
    363375        """ 
    364         from sasmodels import convert 
    365         import re 
    366376        # Create conversion dictionary to send to sasmodels 
    367377        p = dict() 
Note: See TracChangeset for help on using the changeset viewer.