Skip to content
Snippets Groups Projects
Commit 52948683 authored by Gabriel Studer's avatar Gabriel Studer
Browse files

make function consisten with other ost function calls

parent 2e8a7f43
Branches
Tags
No related merge requests found
......@@ -208,9 +208,13 @@ void EditorBase::RenumberAllResidues(int start, bool keep_spacing)
ent_.Impl()->RenumberAllResidues(start, keep_spacing);
}
void EditorBase::RenumberChain(const String& name, int start, bool keep_spacing)
void EditorBase::RenumberChain(const ChainHandle& chain, int start, bool keep_spacing)
{
ent_.Impl()->RenumberChain(name, start, keep_spacing);
CheckHandleValidity(chain);
if(chain.GetEntity()!=ent_){
throw Error("Chain does not belong to the editors entity!");
}
chain.Impl()->RenumberAllResidues(start, keep_spacing);
}
void EditorBase::RenameAtom(AtomHandle atom, const String& new_name)
......
......@@ -293,7 +293,7 @@ public:
/// \param keep_spacing
/// If set to false, residues will continously be renumbered ongoing from start.
/// Otherwise the spacings between the residues are kept.
void RenumberChain(const String& name, int start, bool keep_spacing);
void RenumberChain(const ChainHandle& chain, int start, bool keep_spacing);
/// \brief Get edit mode of editor
EditMode GetMode() const {return mode_;}
......
......@@ -1202,16 +1202,4 @@ void EntityImpl::RenumberAllResidues(int start, bool keep_spacing)
}
void EntityImpl::RenumberChain(const String& name, int start, bool keep_spacing)
{
ChainImplPtr ch=this->FindChain(name);
if(!ch) {
throw Error("Could not find chain with name "+name);
}
ch->RenumberAllResidues(start, keep_spacing);
}
}}} // ns
......@@ -251,8 +251,6 @@ public:
void RenumberAllResidues(int start, bool keep_spacing);
void RenumberChain(const String& name, int start, bool keep_spacing);
private:
void DoCopy(EntityImplPtr dest);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment