Richard Gerkin avatar Richard Gerkin committed 5a51511

Added saving of Analysis Window instances from GUI

Comments (0)

Files changed (3)

Acquisition/Acquisition Settings.ipf

 	
 	strswitch(package)
 		case "sweepsWin":
+		case "analysisWin":
 			string liveInstance = "win0"
 			strswitch(instance)
 				case "_Save_":
 							Core#SetVarPackageSetting(module,package,targetInstance,"right",coords.right,sub="position",create=1)
 							Core#SetVarPackageSetting(module,package,targetInstance,"bottom",coords.bottom,sub="position",create=1)
 							
-							// Copy one of the vertical axes to the generic "Ampl_Axis".   
-							dfref df = Core#InstanceHome(module,package,targetInstance,sub=curr_view)
-							string acqModes = ListAcqModes()
-							variable i
-							for(i=0;i<itemsinlist(acqModes);i+=1)
-								string acqMode = stringfromlist(i,acqModes)
-								dfref sourceDF = df:$(acqMode+"_axis")
-								if(datafolderrefstatus(sourceDF))
+							strswitch(package)
+								case "sweepsWin":
+									// Copy one of the vertical axes to the generic "Ampl_Axis".   
+									dfref df = Core#InstanceHome(module,package,targetInstance,sub=curr_view)
+									string acqModes = ListAcqModes()
+									variable i
+									for(i=0;i<itemsinlist(acqModes);i+=1)
+										string acqMode = stringfromlist(i,acqModes)
+										dfref sourceDF = df:$(acqMode+"_axis")
+										if(datafolderrefstatus(sourceDF))
+											break
+										endif
+									endfor
+									if(datafolderrefstatus(sourceDF))
+										string targetFolder = joinpath({getdatafolder(1,df),"Ampl_Axis"})
+										Core#CopyData(sourceDF,targetFolder)
+									endif
 									break
-								endif
-							endfor
-							if(datafolderrefstatus(sourceDF))
-								string targetFolder = joinpath({getdatafolder(1,df),"Ampl_Axis"})
-								Core#CopyData(sourceDF,targetFolder)
-							endif
+							endswitch
 							
 							if(!Core#SavePackageInstance(module,package,targetInstance))
 								printf "%s instance %s successfully saved.\r",package,targetInstance

Acquisition/Acquisition Windows.ipf

 			string str
 			structput /s info.mouseLoc str
 			SetWindow $info.winname userData(mouseDown)=str
-			if(info.mouseLoc.v<30)
+			if(info.mouseLoc.v<0 && (info.eventMod & 16))
 				PopupContextualMenu Core#ListPackageInstances(module,info.winname)+"_Save_"
 				if(v_flag>=0)
 					SelectPackageInstance(info.winname,s_selection)
 					AnalysisMethodSubSelections(axisNum)
 				endif
 			endif
+			break
+		case "mousedown":
+			print info.mouseLoc
+			if(info.mouseLoc.v<0 && (info.eventMod & 16))
+				PopupContextualMenu Core#ListPackageInstances(module,info.winname)+"_Save_"
+				if(v_flag>=0)
+					SelectPackageInstance(info.winname,s_selection)
+				endif
+			endif
 		case "resize":
 			if(!WinType(info.winname))
 				return -1

Core/Profiles.ipf

 	string style
 	
 	string profileName=profile.name
-	string profileStyle=profile.style
 	variable err=0
 	// Check for conflict with an existing profile name.  
 	string profiles=ListProfiles()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.