- create base image when profile button is off status
- bug: profile button is on status -> exist two table item of same base image
- fix: does not make table item for base image that already exist table item
Change-Id: I34c8361a77c3ccedda74934be45cded5f53bf8e4
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
private void makeTableItem(ProfileButton pButton) {
for (BaseImage image : pButton.getProfile().getImageList()) {
- addTableItem(pButton, image);
+ if (!existBaseImageInTable(image)) {
+ addTableItem(pButton, image);
+ }
}
}
item.setToolTipText(5, image.getDescription());
}
+ private boolean existBaseImageInTable(BaseImage image) {
+ for (TableItem item : table.getItems()) {
+ BaseImage i = (BaseImage)item.getData();
+ if (i.equals(image)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private Menu menu;
private MenuItem modifyMenu;
private MenuItem deleteMenu;