mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-01 10:30:58 +00:00
Added clear_comment utility method
This commit is contained in:
parent
218cfeafe8
commit
5266c5837d
@ -273,6 +273,13 @@ class DefaultSegment(object):
|
||||
rawindex = self.get_raw_index(index)
|
||||
return self.rawdata.comments.get(rawindex, "")
|
||||
|
||||
def clear_comment(self, ranges):
|
||||
self.clear_style_ranges(ranges, comment=True)
|
||||
for start, end in ranges:
|
||||
rawindex = self.get_raw_index(start)
|
||||
if rawindex in self.rawdata.comments:
|
||||
del self.rawdata.comments[rawindex]
|
||||
|
||||
def label(self, index, lower_case=True):
|
||||
if lower_case:
|
||||
return "%04x" % (index + self.start_addr)
|
||||
|
Loading…
Reference in New Issue
Block a user