Skip to content

Commit

Permalink
Restrict XRange to be a positive value
Browse files Browse the repository at this point in the history
Refs #7860
  • Loading branch information
DanNixon committed Oct 6, 2014
1 parent e7d99d3 commit 184069a
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -270,10 +270,18 @@ namespace CustomInterfaces

/**
* Redraws mini plots when user changes previw range or spectrum.
*
* @param prop QtProperty that was changed
* @param value Value it was changed to
*/
void IndirectSymmetrise::replotNewSpectrum(QtProperty *prop, double value)
{
UNUSED_ARG(value);
if(prop == m_properties["PreviewRange"])
{
// If preview range was set negative then set it to the absolute value of the value it was set to
if(value < 0)
m_dblManager->setValue(m_properties["PreviewRange"], fabs(value));
}

if((prop == m_properties["PreviewSpec"]) || (prop == m_properties["PreviewRange"]))
updateMiniPlots();
Expand Down

0 comments on commit 184069a

Please sign in to comment.