Skip to content

Commit

Permalink
Re #7917 Fix problem with saving normalized output
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Sep 11, 2013
2 parents be393b4 + aef2165 commit d9e1a41
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, workspace, is_ref=False, scale=1.0, parent_layout=None):

if parent_layout is not None:
parent_layout.addLayout(self._layout)
parent_layout.connect(self._edit_ctrl, QtCore.SIGNAL("returnPressed()"), self._scale_updated)
parent_layout.connect(self._edit_ctrl, QtCore.SIGNAL("returnPressed()"), self._return_pressed)

def is_selected(self):
return self._radio.isChecked()
Expand All @@ -91,6 +91,11 @@ def get_common_range(self):
xmax = _xmax
return xmin, xmax

def _return_pressed(self):
self._scale_updated()
if self._call_back is not None:
self._call_back()

def _scale_updated(self):
"""
Called when the scaling factors are updated
Expand All @@ -103,10 +108,7 @@ def _scale_updated(self):
item.set_scale(self._scale)
item.apply_scale(xmin=xmin, xmax=xmax)
except:
pass

if self._call_back is not None:
self._call_back()
pass

def delete(self):
if self._radio is not None:
Expand Down Expand Up @@ -275,6 +277,7 @@ def _email_options_changed(self):

def _add_entry(self, workspace):
entry = ReflData(workspace, parent_layout=self._content.angle_list_layout)
entry.connect_to_scale(self.plot_result)
self._workspace_list.append(entry)

def is_running(self, is_running):
Expand Down Expand Up @@ -548,4 +551,4 @@ def get_state(self):
"""
Return dummy state
"""
return StitcherState()
return StitcherState()

0 comments on commit d9e1a41

Please sign in to comment.