From 36307a6839e28022b6dac423ca55230c36da529c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= <moebius@cs.rwth-aachen.de> Date: Tue, 22 Mar 2011 13:25:31 +0000 Subject: [PATCH] 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 --- DataControlPluginScripting.cc | 15 +-------------- Popup.cc | 12 ------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/DataControlPluginScripting.cc b/DataControlPluginScripting.cc index 5887313..d6baf36 100644 --- a/DataControlPluginScripting.cc +++ b/DataControlPluginScripting.cc @@ -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(); } diff --git a/Popup.cc b/Popup.cc index 6969f87..5d077d8 100644 --- a/Popup.cc +++ b/Popup.cc @@ -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); } -- GitLab