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