Add this if condition into the previous if, since the resulting action is the same "action.setEnabled(true)"