Changeset 5129686 in sasview for src/sas/sasgui/plottools
- Timestamp:
- Aug 11, 2016 5:07:32 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1ed6be7
- Parents:
- b2f21e0d
- Location:
- src/sas/sasgui/plottools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/PlotPanel.py
rb2f21e0d r5129686 713 713 if dial.ShowModal() == wx.ID_OK: 714 714 self.xLabel, self.yLabel, self.viewModel = dial.getValues() 715 if self.viewModel == "Linear y vs x":716 self.xLabel = "x"717 self.yLabel = "y"718 self.viewModel = "--"719 dial.setValues(self.xLabel, self.yLabel, self.viewModel)720 if self.viewModel == "Guinier lny vs x^(2)":721 self.xLabel = "x^(2)"722 self.yLabel = "ln(y)"723 self.viewModel = "--"724 dial.setValues(self.xLabel, self.yLabel, self.viewModel)725 if self.viewModel == "XS Guinier ln(y*x) vs x^(2)":726 self.xLabel = "x^(2)"727 self.yLabel = "ln(y*x)"728 self.viewModel = "--"729 dial.setValues(self.xLabel, self.yLabel, self.viewModel)730 if self.viewModel == "Porod y*x^(4) vs x^(4)":731 self.xLabel = "x^(4)"732 self.yLabel = "y*x^(4)"733 self.viewModel = "--"734 dial.setValues(self.xLabel, self.yLabel, self.viewModel)735 if self.viewModel == "Kratky y*x^(2) vs x":736 self.xLabel = "x"737 self.yLabel = "y*x^(2)"738 self.viewModel = "--"739 dial.setValues(self.xLabel, self.yLabel, self.viewModel)740 715 self._onEVT_FUNC_PROPERTY() 741 716 dial.Destroy() -
src/sas/sasgui/plottools/PropertyDialog.py
r09d6719 r5129686 23 23 iy += 1 24 24 ix = 1 25 self.xvalue = wx.ComboBox(self, -1 )25 self.xvalue = wx.ComboBox(self, -1, style=wx.CB_READONLY) 26 26 x_size += self.xvalue.GetSize()[0] 27 sizer.Add(self.xvalue, (iy, ix), (1, 1), wx. EXPAND | wx.ADJUST_MINSIZE, 0)27 sizer.Add(self.xvalue, (iy, ix), (1, 1), wx.ADJUST_MINSIZE, 0) 28 28 29 29 ix += 2 30 self.yvalue = wx.ComboBox(self, -1 )30 self.yvalue = wx.ComboBox(self, -1, style=wx.CB_READONLY) 31 31 x_size += self.yvalue.GetSize()[0] 32 sizer.Add(self.yvalue, (iy, ix), (1, 1), wx. EXPAND | wx.ADJUST_MINSIZE, 0)32 sizer.Add(self.yvalue, (iy, ix), (1, 1), wx.ADJUST_MINSIZE, 0) 33 33 34 34 ix += 2 35 self.view = wx.ComboBox(self, -1) 35 self.view = wx.ComboBox(self, -1, style=wx.CB_READONLY) 36 self.view.Bind(wx.EVT_COMBOBOX, self.viewChanged) 36 37 x_size += self.view.GetSize()[0] 37 38 self.view.SetMinSize((160, 30)) … … 84 85 self.Centre() 85 86 87 def viewChanged(self, event): 88 event.Skip() 89 view = self.view.GetValue() 90 if view == "Linear y vs x": 91 self.xvalue.SetValue("x") 92 self.yvalue.SetValue("y") 93 elif view == "Guinier lny vs x^(2)": 94 self.xvalue.SetValue("x^(2)") 95 self.yvalue.SetValue("ln(y)") 96 elif view == "XS Guinier ln(y*x) vs x^(2)": 97 self.xvalue.SetValue("x^(2)") 98 self.yvalue.SetValue("ln(y*x)") 99 elif view == "Porod y*x^(4) vs x^(4)": 100 self.xvalue.SetValue("x^(4)") 101 self.yvalue.SetValue("y*x^(4)") 102 elif view == "Kratky y*x^(2) vs x": 103 self.xvalue.SetValue("x") 104 self.yvalue.SetValue("y*x^(2)") 105 86 106 def setValues(self, x, y, view): 87 107 """
Note: See TracChangeset
for help on using the changeset viewer.