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

don't mark XCS dirty when applying a transform to an entity

It is completely sufficient to mark the organizer dirty. Fixes
BZDNG-250.
parent 7a5ea266
Branches
Tags
No related merge requests found
......@@ -770,7 +770,7 @@ void EntityImpl::SetTransform(const geom::Mat4 transfmat)
identity_transf_ = false;
}
this->UpdateTransformedPos();
this->MarkXCSDirty();
this->MarkOrganizerDirty();
}
void EntityImpl::AttachObserver(const EntityObserverPtr& o)
......@@ -1049,6 +1049,7 @@ void EntityImpl::UpdateOrganizer()
e=atom_map_.end(); i!=e; ++i) {
atom_organizer_.Add(i->second, i->second->GetPos());
}
dirty_flags_&=~DirtyOrganizer;
}
void EntityImpl::IncXCSEditorCount()
......
......@@ -92,6 +92,16 @@ BOOST_AUTO_TEST_CASE(throw_invalid_ent_view)
BOOST_CHECK_NO_THROW(CheckHandleValidity(ent.CreateEmptyView()));
}
BOOST_AUTO_TEST_CASE(bzdng250)
{
EntityHandle eh=make_test_entity();
eh.EditXCS().ApplyTransform(geom::Mat4(-1, 0, 0, 0,
0, 1, 0, 0,
0, 0,-1, 0,
0, 0, 0, 1));
BOOST_CHECK_NO_THROW(eh.FindResidue("A", 1).FindTorsion("PHI").GetAngle());
}
BOOST_AUTO_TEST_CASE(entity_creator)
{
EntityHandle eh = CreateEntity();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment