Skip to content

Commit 39bb35a

Browse files
committed
Sweepbrowser/Databrowser: Revamp settings tab
We now grey out more dependent controls to make the GUI easier to understand. Also dependent controls are moved closer together. For depending controls properly working together we also need to disable/enable them via BSP_CheckProc_ChangedSetting, initialize them properly in DB_ResetAndStoreCurrentDBPanel and set their Configuration restore priority correctly. For the latter we use 10 for controls which have other controls depending on them and 20 for controls which have dependencies.
1 parent 30c6f60 commit 39bb35a

File tree

3 files changed

+90
-64
lines changed

3 files changed

+90
-64
lines changed

Packages/MIES/MIES_BrowserSettingsPanel.ipf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,20 @@ Function BSP_CheckProc_ChangedSetting(cba) : CheckBoxControl
11181118
DisableControl(bsPanel, "slider_BrowserSettings_dDAQ")
11191119
endif
11201120
break
1121+
case "check_BrowserSettings_DAC":
1122+
if(checked)
1123+
EnableControl(bsPanel, "check_BrowserSettings_VisEpochs")
1124+
else
1125+
DisableControl(bsPanel, "check_BrowserSettings_VisEpochs")
1126+
endif
1127+
break
1128+
case "check_BrowserSettings_TTL":
1129+
if(checked)
1130+
EnableControl(bsPanel, "check_BrowserSettings_splitTTL")
1131+
else
1132+
DisableControl(bsPanel, "check_BrowserSettings_splitTTL")
1133+
endif
1134+
break
11211135
case "check_BrowserSettings_VisEpochs":
11221136
#if IgorVersion() >= 9.0
11231137
if(checked)

Packages/MIES/MIES_DataBrowser.ipf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ Function DB_ResetAndStoreCurrentDBPanel()
196196
CheckBox check_BrowserSettings_DAC WIN = $bsPanel, value= 0
197197
CheckBox check_BrowserSettings_ADC WIN = $bsPanel, value= 1
198198
CheckBox check_BrowserSettings_TTL WIN = $bsPanel, value= 0
199+
CheckBox check_BrowserSettings_splitTTL WIN = $bsPanel, value= 0,disable=DISABLE_CONTROL_BIT
199200
CheckBox check_BrowserSettings_OChan WIN = $bsPanel, value= 0
200201
CheckBox check_BrowserSettings_dDAQ WIN = $bsPanel, value= 0
201202
CheckBox check_Calculation_ZeroTraces WIN = $bsPanel, value= 0
@@ -209,14 +210,13 @@ Function DB_ResetAndStoreCurrentDBPanel()
209210
CheckBox check_Display_EqualYrange WIN = $bsPanel, value= 0, disable=0
210211
CheckBox check_Display_EqualYignore WIN = $bsPanel, value= 0, disable=0
211212
SetVariable setvar_Display_EqualYlevel WIN = $bsPanel, value= _NUM:0
212-
Slider slider_BrowserSettings_dDAQ WIN = $bsPanel, value= -1
213+
Slider slider_BrowserSettings_dDAQ WIN = $bsPanel, value= -1,disable=DISABLE_CONTROL_BIT
213214
CheckBox check_SweepControl_HideSweep WIN = $bsPanel, value= 0
214-
CheckBox check_BrowserSettings_splitTTL WIN = $bsPanel, value= 0
215215
CheckBox check_BrowserSettings_DB_Passed WIN = $bsPanel, value= 0
216216
CheckBox check_BrowserSettings_DB_Failed WIN = $bsPanel, value= 0
217217
CheckBox check_BrowserSettings_SF WIN = $bsPanel, value= 0
218218

219-
CheckBox check_BrowserSettings_VisEpochs WIN = $bsPanel, value=0
219+
CheckBox check_BrowserSettings_VisEpochs WIN = $bsPanel, value=0,disable=DISABLE_CONTROL_BIT
220220

221221
sfFormula = BSP_GetSFFormula(panelTitle)
222222
ReplaceNotebookText(sfFormula, "data(\rcursors(A,B),\rchannels(AD),\rsweeps()\r)")

0 commit comments

Comments
 (0)