Ignore:
Timestamp:
Jun 11, 2008 10:45:06 AM (15 years ago)
Author:
srkline
Message:

Changes in response to Lionel:

  • ShowSchematic? now warns you if there is one already open
  • FreezeModel? is now truly data folder aware. Supposedly was done 9/27/07, but I could find no modifications in the log.
Location:
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/ModelPicker/SANSModelPicker_v40.ipf

    r318 r380  
    771771// SRK  09 JUN 2006 
    772772// 
    773 Proc FreezeModel(xWave,yWave,newNameStr) 
     773// made data folder-aware in a somewhat messy way, but wavelist works only on the 
     774// current data folder, and WaveSelectorWidget is waaaaaay too complex 
     775// 
     776Function FreezeModel() 
     777        String modelType 
     778        Prompt modelType,"What type of model to freeze? (smeared models use the current data set)",popup,"Unsmeared Model;Smeared Model;" 
     779        DoPrompt "Type of Data",modelType 
     780         
     781        if(V_Flag==1)           //user canceled 
     782                return(1) 
     783        endif 
     784         
    774785        String xWave,yWave,newNameStr 
    775         Prompt xwave,"X data",popup,WaveList("*",";","") 
    776         Prompt ywave,"y data",popup,WaveList("*",";","") 
    777         Prompt newNameStr,"new name for the waves, _q and _i will be appended" 
    778          
     786 
     787        SetDataFolder root: 
     788        if(cmpstr(modelType,"Smeared Model")==0) 
     789                ControlInfo/W=WrapperPanel popup_0 
     790                String folderStr=S_Value 
     791                SetDataFolder $("root:"+folderStr) 
     792         
     793                Prompt xwave,"X data",popup,WaveList("s*",";","") 
     794                Prompt ywave,"Y data",popup,WaveList("s*",";","") 
     795                Prompt newNameStr,"new name for the waves, _q and _i will be appended" 
     796        else 
     797                Prompt xwave,"X data",popup,WaveList("x*",";","") 
     798                Prompt ywave,"Y data",popup,WaveList("y*",";","") 
     799                Prompt newNameStr,"new name for the waves, _q and _i will be appended" 
     800        endif 
     801 
     802        DoPrompt "Select the Waves to Freeze",xwave,ywave,newNameStr 
     803        if(V_Flag==1)           //user canceled 
     804                SetDataFolder root: 
     805                return(1) 
     806        endif 
     807 
    779808        Duplicate/O $xwave,$(newNameStr+"_q") 
    780809        Duplicate/O $ywave,$(newNameStr+"_i") 
     
    783812        AppendToGraph $(newNameStr+"_i") vs $(newNameStr+"_q")  
    784813         
    785 End 
     814        SetDataFolder root: 
     815end 
  • sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Wrapper_v40.ipf

    r378 r380  
    133133        endswitch 
    134134 
    135         ControlUpdate/W=WrapperPanel popup_0 
     135//      ControlUpdate/W=WrapperPanel popup_0 
     136        //instead of a simple controlUpdate, better to pop the menu to make sure that the other menus follow 
     137        // but not sure how to get the most recently loaded file as the selected item - bring the  
     138        // wrapper panel back to the top - then pop -  
     139 
    136140        return 0 
    137141End 
Note: See TracChangeset for help on using the changeset viewer.