DougEdey / StrangeBrew

Java based Homebrew Recipe tool
22 stars 10 forks source link

[Patch] Fixes the Minute field in the Hops table #105

Closed DougEdey closed 12 years ago

DougEdey commented 12 years ago

Converted from SourceForge issue 1727837, submitted by jeroen_wouters

To parse a newly entered value in the "Min" field in the Hops table, the function Int.parseInt was used.

However, after loading a recipe, a value in the form "xx.x" is displayed (e.g. "60.0"). New values entered in this form can not be parsed by parseInt and so the value remains unaltered.

It would be better to parse the string as a double first and then convert it to an int. This way, values can be entered in whatever form.

This patch also removes a degree sign in one of the comments, since the compiler complained about this.

DougEdey commented 12 years ago

Submitted by andrew_avis

Logged In: YES user_id=1135612 Originator: NO

Patch applied to 2.0rc2