summaryrefslogtreecommitdiffstats
path: root/kig/kig/kig_commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kig/kig/kig_commands.cpp')
-rw-r--r--kig/kig/kig_commands.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kig/kig/kig_commands.cpp b/kig/kig/kig_commands.cpp
index d6b79805..bcf26969 100644
--- a/kig/kig/kig_commands.cpp
+++ b/kig/kig/kig_commands.cpp
@@ -274,7 +274,7 @@ class ChangeParentsAndTypeTask::Private
{
public:
ObjectTypeCalcer* o;
- std::vector<ObjectCalcer::shared_ptr> newtqparents;
+ std::vector<ObjectCalcer::shared_ptr> newparents;
const ObjectType* newtype;
};
@@ -284,13 +284,13 @@ ChangeParentsAndTypeTask::~ChangeParentsAndTypeTask()
}
ChangeParentsAndTypeTask::ChangeParentsAndTypeTask(
- ObjectTypeCalcer* o, const std::vector<ObjectCalcer*>& newtqparents,
+ ObjectTypeCalcer* o, const std::vector<ObjectCalcer*>& newparents,
const ObjectType* newtype )
: KigCommandTask(), d( new Private )
{
d->o = o;
- std::copy( newtqparents.begin(), newtqparents.end(),
- std::back_inserter( d->newtqparents ) );
+ std::copy( newparents.begin(), newparents.end(),
+ std::back_inserter( d->newparents ) );
d->newtype = newtype;
}
@@ -300,17 +300,17 @@ void ChangeParentsAndTypeTask::execute( KigPart& doc )
d->o->setType( d->newtype );
d->newtype = oldtype;
- std::vector<ObjectCalcer*> oldtqparentso = d->o->tqparents();
- std::vector<ObjectCalcer::shared_ptr> oldtqparents(
- oldtqparentso.begin(), oldtqparentso.end() );
- std::vector<ObjectCalcer*> newtqparents;
- for ( std::vector<ObjectCalcer::shared_ptr>::iterator i = d->newtqparents.begin();
- i != d->newtqparents.end(); ++i )
- newtqparents.push_back( i->get() );
- d->o->setParents( newtqparents );
- d->newtqparents = oldtqparents;
-
- for ( std::vector<ObjectCalcer*>::iterator i = newtqparents.begin(); i != newtqparents.end(); ++i )
+ std::vector<ObjectCalcer*> oldparentso = d->o->parents();
+ std::vector<ObjectCalcer::shared_ptr> oldparents(
+ oldparentso.begin(), oldparentso.end() );
+ std::vector<ObjectCalcer*> newparents;
+ for ( std::vector<ObjectCalcer::shared_ptr>::iterator i = d->newparents.begin();
+ i != d->newparents.end(); ++i )
+ newparents.push_back( i->get() );
+ d->o->setParents( newparents );
+ d->newparents = oldparents;
+
+ for ( std::vector<ObjectCalcer*>::iterator i = newparents.begin(); i != newparents.end(); ++i )
( *i )->calc( doc.document() );
d->o->calc( doc.document() );
std::set<ObjectCalcer*> alltqchildren = getAllChildren( d->o );