Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 178:03dcca7e5ba4
Fix N estimate interface
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 21 Feb 2014 18:38:45 +0100 |
parents | d96f0b04f7fe |
children | 75e37ba8c417 |
comparison
equal
deleted
inserted
replaced
177:5b4b7f37bd3b | 178:03dcca7e5ba4 |
---|---|
1881 int visible; | 1881 int visible; |
1882 | 1882 |
1883 switch (event) | 1883 switch (event) |
1884 { | 1884 { |
1885 case EVENT_COMMIT: | 1885 case EVENT_COMMIT: |
1886 GetPanelAttribute(EstimateNPanel, ATTR_VISIBLE , &visible); | |
1887 if (! visible) | |
1888 DisplayPanel(EstimateNPanel); | |
1889 // reset N estimate | 1886 // reset N estimate |
1890 SetCtrlVal(EstimateNPanel, ESTIMATEN_N, 0.0); | 1887 SetCtrlVal(EstimateNPanel, ESTIMATEN_N, 0.0); |
1891 // set current frep | 1888 // set current frep |
1892 SetCtrlVal(EstimateNPanel, ESTIMATEN_FREP, 250e6 + Math1); | 1889 SetCtrlVal(EstimateNPanel, ESTIMATEN_FREP, 250e6 + Math1); |
1893 switch (control) { | 1890 switch (control) { |
1894 case PANEL_ESTIMATE_N2: | 1891 case PANEL_ESTIMATE_N2: |
1895 SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, HG_WAVELENGTH); | 1892 SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, HG_WAVELENGTH); |
1896 SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Hg"); | 1893 SetPanelAttribute(EstimateNPanel, ATTR_TITLE, "Estimate N_Hg"); |
1897 SetPanelAttribute(panel, ATTR_CALLBACK_DATA, HG); | 1894 SetPanelAttribute(EstimateNPanel, ATTR_CALLBACK_DATA, HG); |
1898 break; | 1895 break; |
1899 case PANEL_ESTIMATE_N3: | 1896 case PANEL_ESTIMATE_N3: |
1900 SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, SR_WAVELENGTH); | 1897 SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, SR_WAVELENGTH); |
1901 SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Sr"); | 1898 SetPanelAttribute(EstimateNPanel, ATTR_TITLE, "Estimate N_Sr"); |
1902 SetPanelAttribute(panel, ATTR_CALLBACK_DATA, SR); | 1899 SetPanelAttribute(EstimateNPanel, ATTR_CALLBACK_DATA, SR); |
1903 break; | 1900 break; |
1904 } | 1901 } |
1902 GetPanelAttribute(EstimateNPanel, ATTR_VISIBLE , &visible); | |
1903 if (! visible) | |
1904 DisplayPanel(EstimateNPanel); | |
1905 break; | 1905 break; |
1906 } | 1906 } |
1907 return 0; | 1907 return 0; |
1908 } | 1908 } |
1909 | 1909 |