The cython subclass is now correctly chosen when cloning a view
This commit is contained in:
@ -694,14 +694,20 @@ cdef class OBIDMS :
|
||||
|
||||
cdef object view_class
|
||||
|
||||
# Get right subclass depending on view type
|
||||
if view_type is not None :
|
||||
if view_type == bytes2str(VIEW_TYPE_NUC_SEQS) :
|
||||
view_class = OBIView_NUC_SEQS
|
||||
else :
|
||||
view_class = OBIView
|
||||
# Check the type of the view to clone if there is one # TODO make generic for future other view types
|
||||
if view_to_clone is not None and \
|
||||
((type(view_to_clone) == str and self.read_view_infos(view_to_clone)["view_type"] == VIEW_TYPE_NUC_SEQS) or \
|
||||
isinstance(view_to_clone, OBIView_NUC_SEQS)) :
|
||||
view_class = OBIView_NUC_SEQS
|
||||
|
||||
return view_class(self, view_name, new=True, view_to_clone=view_to_clone, line_selection=line_selection, comments=comments)
|
||||
|
||||
|
||||
|
||||
cpdef dict read_view_infos(self, str view_name) :
|
||||
|
||||
|
Reference in New Issue
Block a user