Changeset 944


Ignore:
Timestamp:
May 23, 2020 8:20:45 PM (2 years ago)
Author:
ilavsky
Message:

Fix how to count the waves

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/User Procedures/Indra 2/IN2_GeneralProcedures.ipf

    r943 r944  
    539539        endif
    540540        return menuText
     541End
     542//************************************************************************************************
     543// Returns the truth that the first selected object is a text wave.
     544static Function GetSelectedTextWave(WAVE/Z &w1)
     545        if (strlen(GetBrowserSelection(-1)) == 0)       // If true, DB is not open
     546                return 0
     547        endif
     548       
     549        WAVE/Z w1 = $(GetBrowserSelection(0))   // may be null
     550        if (WaveExists(w1) && (WaveType(w1, 1) == 2))
     551                return 1
     552        endif
     553        return 0
    541554End
    542555//************************************************************************************************
     
    27782791                NewDataFolder /O/S root:$nameStr
    27792792                traces=TraceNameList(GraphwinNmNew,";",3)
    2780                 for(i=ItemsInList(traces);i>0;i-=1)
     2793                for(i=ItemsInList(traces)-1;i>=0;i-=1)
    27812794                        trace=StringFromList(i,traces)
    27822795                        Wave TraceWave=TraceNameToWaveRef(GraphwinNmNew,trace)
Note: See TracChangeset for help on using the changeset viewer.