Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qgsDoubleToString in Qgis.h error #21027

Closed
qgib opened this issue Jun 11, 2015 · 2 comments
Closed

qgsDoubleToString in Qgis.h error #21027

qgib opened this issue Jun 11, 2015 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority

Comments

@qgib
Copy link
Contributor

qgib commented Jun 11, 2015

Author Name: Fabio Cosimelli (Fabio Cosimelli)
Original Redmine Issue: 12947
Affected QGIS version: 2.8.2


If precision is 0 the number 12000 becomes "12", probably the solution is:

inline QString qgsDoubleToString( const double &a, const int &precision = 17 )
{
if(precision)
return QString::number( a, 'f', precision ).remove( QRegExp( "\\.?0+$" ) );
else
return QString::number( a, 'f', precision );
}

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2015

Author Name: Giovanni Manghi (@gioman)


better submit a patch as a pull request on github?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2015

Author Name: Matthias Kuhn (@m-kuhn)


Fixed in changeset "ac38b213802919d652b062e65bd96c37c9e199ab".


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority
Projects
None yet
Development

No branches or pull requests

1 participant