Skip to content
Snippets Groups Projects
Commit 450a9eb7 authored by Marco Biasini's avatar Marco Biasini
Browse files

added RenameAtom method to EditorBase

parent 9a64ec3d
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
#include "impl/entity_impl.hh"
#include "impl/chain_impl.hh"
#include "impl/residue_impl.hh"
#include "impl/atom_impl.hh"
#include "mol.hh"
/*
......@@ -125,6 +125,12 @@ void EditorBase::DeleteResidue(const ResidueHandle& residue_handle)
residue_handle.GetChain().Impl()->DeleteResidue(residue_handle.Impl());
}
void EditorBase::RenameAtom(AtomHandle atom, const String& new_name)
{
CheckHandleValidity(atom);
atom.Impl()->SetName(new_name);
}
BondHandle EditorBase::Connect(const AtomHandle& first,
const AtomHandle& second) {
CheckHandleValidity(first);
......
......@@ -187,6 +187,9 @@ public:
/// \brief Get edit mode of editor
EditMode GetMode() const;
/// \brief change the name of the atom to the new name
void RenameAtom(AtomHandle atom, const String& new_name);
protected:
EditorBase(const EntityHandle& ent, EditMode mode);
void UpdateTrace();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment