Tidy up code for secondary object nodes (see r18706)
svn: r18740
This commit is contained in:
@ -181,14 +181,6 @@ class CitationTreeModel(CitationBaseModel, TreeBaseModel):
|
|||||||
if self.get_node(data[5]):
|
if self.get_node(data[5]):
|
||||||
self.add_node(data[5], handle, sort_key, handle, secondary=True)
|
self.add_node(data[5], handle, sort_key, handle, secondary=True)
|
||||||
|
|
||||||
def add_secondary_row(self, handle, data):
|
|
||||||
"""
|
|
||||||
Add a secondary node to the node map for a citation.
|
|
||||||
"""
|
|
||||||
# parameters are parent, child, sortkey, handle
|
|
||||||
self.add_node(self.citation_source(data), handle,
|
|
||||||
self.citation_page(data), handle, secondary=True)
|
|
||||||
|
|
||||||
def on_get_n_columns(self):
|
def on_get_n_columns(self):
|
||||||
return len(self.fmap)+1
|
return len(self.fmap)+1
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
|||||||
if data:
|
if data:
|
||||||
self.add_row(handle, data)
|
self.add_row(handle, data)
|
||||||
else:
|
else:
|
||||||
self.add_secondary_row(handle, self.map2(handle))
|
self.add_row2(handle, self.map2(handle))
|
||||||
|
|
||||||
_LOG.debug(self.__class__.__name__ + ' add_row_by_handle ' +
|
_LOG.debug(self.__class__.__name__ + ' add_row_by_handle ' +
|
||||||
str(time.clock() - cput) + ' sec')
|
str(time.clock() - cput) + ' sec')
|
||||||
|
Reference in New Issue
Block a user