Don't commit changes on paint events or updateUI events.
Also use std::numeric_limits::epsilon for comparing doubles. Fixes https://gitlab.com/kicad/code/kicad/issues/13851
This commit is contained in:
@@ -451,3 +451,9 @@ int SIM_VALUE::ToInt( const std::string& aString, int aDefault )
|
||||
|
||||
return aDefault;
|
||||
}
|
||||
|
||||
|
||||
bool SIM_VALUE::Equal( double aLH, const std::string& aRH )
|
||||
{
|
||||
return std::abs( aLH - ToDouble( aRH ) ) <= std::numeric_limits<double>::epsilon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user