Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Fixed bug Exception launched when it had no fields #26

Merged
merged 1 commit into from
Jan 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ protected void sublayout( int width, int height )

// There may be a few remaining pixels after dividing up the space
// we must split up the space between the first and last buttons
int fieldWidth = width / numFields;

//if there are no fields the current fieldWidth should be 0
final int fieldWidth;
if (numFields == 0)
fieldWidth = 0;
else
fieldWidth = width / numFields;
int firstFieldExtra = 0;
int lastFieldExtra = 0;

Expand Down