Commit ff30d844 authored by Jan Möbius's avatar Jan Möbius
Browse files

objectProperties changed is now handled internally from core

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7934 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7b394c3e
......@@ -386,7 +386,6 @@ void DataControlPlugin::slotDataChanged ( int _id, int _column, const QVariant&
// Name
case 0:
obj->setName( _value.toString() );
emit objectPropertiesChanged( obj->id() );
break;
// show/hide
......@@ -431,15 +430,8 @@ void DataControlPlugin::slotMoveBaseObject(int _id, int _newParentId){
BaseObject* oldParent = obj->parent();
//remove from old parent
oldParent->removeChild( obj );
//set new parent
obj->setParent( parent );
parent->appendChild( obj );
// and inform everyone that the parent changed
emit objectPropertiesChanged( _id );
//if oldParent is an empty group -> delete it
if ( oldParent != PluginFunctions::objectRoot() && oldParent->childCount() == 0 )
......@@ -530,12 +522,7 @@ void DataControlPlugin::loadIniFileOptionsLast( INIFile& _ini ) {
for ( int i = 0 ; i < elementChildren.size() ; ++i ) {
BaseObject* childItem = PluginFunctions::objectRoot()->childExists( elementChildren[i] );
if ( childItem ) {
childItem->parent()->removeChild(childItem);
childItem->setParent(group);
group->appendChild(childItem);
//inform everyone that the parent changed
emit objectPropertiesChanged( childItem->id() );
}
}
}
......
......@@ -80,7 +80,6 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
// BaseInterface
void updateView();
void updatedObject(int);
void objectPropertiesChanged(int);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -224,8 +224,6 @@ void DataControlPlugin::setObjectName( int objectId, QString _name ) {
BaseObjectData* object;
if ( PluginFunctions::getObject(objectId,object) ){
object->setName( _name );
emit objectPropertiesChanged( object->id() );
}
}
......@@ -324,20 +322,13 @@ int DataControlPlugin::groupObjects(IdList _objectIDs, QString _groupName) {
//append new children to group
for ( int i = 0 ; i < objs.size() ; ++i) {
(objs[i])->parent()->removeChild( objs[i] );
(objs[i])->setParent( dynamic_cast< BaseObject* >( groupItem ) );
groupItem->appendChild( objs[i] );
//inform everyone that the parent changed
emit objectPropertiesChanged( (objs[i])->id() );
}
//update target/source state
groupItem->visible(visible);
groupItem->target(target);
groupItem->source(source);
emit objectPropertiesChanged( groupItem->id() );
return groupItem->id();
}
......
......@@ -118,15 +118,8 @@ void DataControlPlugin::slotUngroup ( ) {
for (int i=group->childCount()-1; i >= 0; i--){
BaseObject* child = group->child(i);
// remove it from the old parent
group->removeChild( child );
// then change the parent
child->setParent(group->parent());
child->parent()->appendChild( child );
// and inform everyone that the parent changed
emit objectPropertiesChanged( child->id() );
}
//delete the group
......@@ -234,20 +227,13 @@ void DataControlPlugin::slotGroup() {
PluginFunctions::getObject(id, item );
//and move it into the group
item->parent()->removeChild(item);
item->setParent( dynamic_cast< BaseObject* >( groupItem ) );
groupItem->appendChild(item);
//inform everyone that the parent changed
emit objectPropertiesChanged( id );
}
//update target/source state
groupItem->visible(visible);
groupItem->target(target);
groupItem->source(source);
emit objectPropertiesChanged( groupItem->id() );
}
......@@ -451,7 +437,6 @@ void DataControlPlugin::slotRename(){
item->name(), &ok);
if (ok && !newName.isEmpty()){
item->setName(newName);
emit objectPropertiesChanged( item->id() );
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment