# HG changeset patch # User Daniele Nicolodi # Date 1393004325 -3600 # Node ID 03dcca7e5ba4cc9f9dd9018c4498816f5457272a # Parent 5b4b7f37bd3bae5e3367d76cbac3a26c41edb740 Fix N estimate interface diff -r 5b4b7f37bd3b -r 03dcca7e5ba4 FXAnalyse.c --- a/FXAnalyse.c Fri Feb 21 18:38:44 2014 +0100 +++ b/FXAnalyse.c Fri Feb 21 18:38:45 2014 +0100 @@ -1883,9 +1883,6 @@ switch (event) { case EVENT_COMMIT: - GetPanelAttribute(EstimateNPanel, ATTR_VISIBLE , &visible); - if (! visible) - DisplayPanel(EstimateNPanel); // reset N estimate SetCtrlVal(EstimateNPanel, ESTIMATEN_N, 0.0); // set current frep @@ -1893,15 +1890,18 @@ switch (control) { case PANEL_ESTIMATE_N2: SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, HG_WAVELENGTH); - SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Hg"); - SetPanelAttribute(panel, ATTR_CALLBACK_DATA, HG); + SetPanelAttribute(EstimateNPanel, ATTR_TITLE, "Estimate N_Hg"); + SetPanelAttribute(EstimateNPanel, ATTR_CALLBACK_DATA, HG); break; case PANEL_ESTIMATE_N3: SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, SR_WAVELENGTH); - SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Sr"); - SetPanelAttribute(panel, ATTR_CALLBACK_DATA, SR); + SetPanelAttribute(EstimateNPanel, ATTR_TITLE, "Estimate N_Sr"); + SetPanelAttribute(EstimateNPanel, ATTR_CALLBACK_DATA, SR); break; } + GetPanelAttribute(EstimateNPanel, ATTR_VISIBLE , &visible); + if (! visible) + DisplayPanel(EstimateNPanel); break; } return 0;