ChangeScreen2: Always show 'No Score' as label help for zero votings

Initially when the reply box is opened and the currently selected
score for a label is '0' then it shows 'No Score' in the label help
column. When hovering over another score it shows the help for that
label, but on mouse out the label help is reset to show the help of
the selected score. This works for all scores, but not for the zero
score. If '0' is selected, on mouse out the label help column is
cleared. The label help column is also cleared if '0' is selected by
the user.

This behaviour is inconsistent as sometimes 'No Score' is shown for
zero scores and sometimes not.

Change-Id: I93a088f9fef0071e63a43554ea2ef709c1463f0d
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin 2014-07-11 15:59:30 +02:00 committed by David Pursehouse
parent 91f3a7456f
commit 368553805f

View File

@ -475,7 +475,7 @@ class ReplyBox extends Composite {
void select(LabelRadioButton b) {
selected = b;
labelsTable.setText(row, labelHelpColumn, b.value != 0 ? b.text : "");
labelsTable.setText(row, labelHelpColumn, b.text);
}
void selectMax() {
@ -532,7 +532,7 @@ class ReplyBox extends Composite {
@Override
public void onMouseOut(MouseOutEvent event) {
LabelRadioButton b = group.selected;
String s = b != null && b.value != 0 ? b.text : "";
String s = b != null ? b.text : "";
labelsTable.setText(group.row, labelHelpColumn, s);
}
}