233 idx = self.__model.getWatchPointIndex(cond, special) |
233 idx = self.__model.getWatchPointIndex(cond, special) |
234 duplicate = idx.isValid() and idx.internalPointer() != index.internalPointer() |
234 duplicate = idx.isValid() and idx.internalPointer() != index.internalPointer() |
235 if showMessage and duplicate: |
235 if showMessage and duplicate: |
236 if not special: |
236 if not special: |
237 msg = self.tr( |
237 msg = self.tr( |
238 """<p>A watch expression '<b>{0}</b>'""" """ already exists.</p>""" |
238 """<p>A watch expression '<b>{0}</b>' already exists.</p>""" |
239 ).format(Utilities.html_encode(cond)) |
239 ).format(Utilities.html_encode(cond)) |
240 else: |
240 else: |
241 msg = self.tr( |
241 msg = self.tr( |
242 """<p>A watch expression '<b>{0}</b>'""" |
242 """<p>A watch expression '<b>{0}</b>'""" |
243 """ for the variable <b>{1}</b> already exists.</p>""" |
243 """ for the variable <b>{1}</b> already exists.</p>""" |