Skip to content

Commit

Permalink
Removed the usage of the old values for new PP tool.
Browse files Browse the repository at this point in the history
Automatic ones are used, as everywhere. This didn't make sense when using graph tools, e.g. zoom.

Refs #5116
  • Loading branch information
arturbekasov committed Aug 8, 2013
1 parent 0708b7f commit 91a0c97
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions Code/Mantid/MantidPlot/src/Mantid/PeakPickerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,13 @@ m_width_set(true),m_width(0),m_addingPeak(false),m_resetting(false)
if (m_fitPropertyBrowser->count() == 0 || (m_fitPropertyBrowser->count() == 1 && m_fitPropertyBrowser->isAutoBack()))
{
m_init = true;
// If part of custom interface (i.e muon analysis)
if (customInterface)
{
// Set the vertical lines to correspond to the StartX and EndX stated on the custom interface.
xMin(m_fitPropertyBrowser->startX());
xMax(m_fitPropertyBrowser->endX());
}
else // Do what was done before
{
QwtScaleMap xMap = d_graph->plotWidget()->canvasMap(QwtPlot::xBottom);
double s1 = xMap.s1(), s2 = xMap.s2();
double ds = fabs(s2-s1)*0.05;
xMin(s1 + ds);
xMax(s2 - ds);
}

QwtScaleMap xMap = d_graph->plotWidget()->canvasMap(QwtPlot::xBottom);
double s1 = xMap.s1(), s2 = xMap.s2();
double ds = fabs(s2-s1)*0.05;
xMin(s1 + ds);
xMax(s2 - ds);

m_changingXMin = false;
m_changingXMax = false;
m_fitPropertyBrowser->setStartX(xMin());
Expand Down

0 comments on commit 91a0c97

Please sign in to comment.