Remove red background for outdated dependency after rebase
In the Dependencies table on the ChangeScreen an outdated dependency is
highlighted by a red background. If the user clicks on the rebase
button and the rebase is successful the outdated dependency gets fixed,
but in the Dependencies table the dependency is still highlighted by
the red background because the corresponding style is not removed. This
was broken by af4138b965.
Change-Id: I7ae672a6adea721bac91c7b6584cca6d0b8f3a74
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -208,6 +208,7 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
s += " (" + c.getStatus().name() + ")";
|
||||
}
|
||||
if (changeRowFormatter != null) {
|
||||
removeChangeStyle(row, changeRowFormatter);
|
||||
final String rowStyle = changeRowFormatter.getRowStyle(c);
|
||||
if (rowStyle != null) {
|
||||
table.getRowFormatter().addStyleName(row, rowStyle);
|
||||
@@ -226,6 +227,19 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
setRowItem(row, c);
|
||||
}
|
||||
|
||||
private void removeChangeStyle(int row,
|
||||
final ChangeRowFormatter changeRowFormatter) {
|
||||
final ChangeInfo oldChange = getRowItem(row);
|
||||
if (oldChange == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final String oldRowStyle = changeRowFormatter.getRowStyle(oldChange);
|
||||
if (oldRowStyle != null) {
|
||||
table.getRowFormatter().removeStyleName(row, oldRowStyle);
|
||||
}
|
||||
}
|
||||
|
||||
private AccountLink link(final Account.Id id) {
|
||||
return AccountLink.link(accountCache, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user