Skip to content
Snippets Groups Projects
Commit 36307a68 authored by Jan Möbius's avatar Jan Möbius
Browse files

Don't set the source target and visibility when grouping, as it messes up...

Don't set the source target and visibility when grouping, as it messes up existing selection; Fixes Bug 357

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11173 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3f9884a0
No related branches found
No related tags found
No related merge requests found
......@@ -289,13 +289,8 @@ int DataControlPlugin::groupObjects(IdList _objectIDs, QString _groupName) {
return -1;
}
//check if all objects have the same parent
//abort if the parents differ
bool visible = (objs[0])->visible();
bool target = (objs[0])->target();
bool source = (objs[0])->source();
// Check if all objects have the same parent
// Abort if the parents differ
BaseObject* parent = (objs[0])->parent();
for ( int i = 1 ; i < objs.size() ; ++i){
if ( parent != (objs[i])->parent() ){
......@@ -303,9 +298,6 @@ int DataControlPlugin::groupObjects(IdList _objectIDs, QString _groupName) {
return -1;
}
visible |= (objs[i])->visible();
target |= (objs[i])->target();
source |= (objs[i])->source();
}
//create new group
......@@ -327,11 +319,6 @@ int DataControlPlugin::groupObjects(IdList _objectIDs, QString _groupName) {
for ( int i = 0 ; i < objs.size() ; ++i) {
(objs[i])->setParent( dynamic_cast< BaseObject* >( groupItem ) );
}
//update target/source state
groupItem->visible(visible);
groupItem->target(target);
groupItem->source(source);
return groupItem->id();
}
......
......@@ -183,10 +183,6 @@ void DataControlPlugin::slotGroup() {
return;
}
bool visible = obj0->visible();
bool target = obj0->target();
bool source = obj0->source();
BaseObject* parent = obj0->parent();
for ( int i = 1 ; i < indexList.size() ; ++i) {
......@@ -203,10 +199,6 @@ void DataControlPlugin::slotGroup() {
return;
}
//remember if at least on child was target/source
visible |= item->visible();
target |= item->target();
source |= item->source();
}
//create new group
......@@ -232,10 +224,6 @@ void DataControlPlugin::slotGroup() {
item->setParent( dynamic_cast< BaseObject* >( groupItem ) );
}
//update target/source state
groupItem->visible(visible);
groupItem->target(target);
groupItem->source(source);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment