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

handle objectSelectionChanged in core

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7799 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0cb30062
......@@ -58,8 +58,6 @@ void DataControlPlugin::slotContextMenuTarget( ) {
return;
object->target( targetAction_->isChecked() );
emit objectSelectionChanged(objectId);
}
void DataControlPlugin::slotContextMenuHide( ) {
......@@ -89,8 +87,6 @@ void DataControlPlugin::slotContextMenuSource( ) {
return;
object->source( sourceAction_->isChecked() );
emit objectSelectionChanged(objectId);
}
void DataControlPlugin::slotUpdateContextMenu( int _objectId) {
......
......@@ -339,13 +339,11 @@ void DataControlPlugin::slotDataChanged ( int _id, int _column, const QVariant&
// source
case 2:
obj->source( _value.toBool() );
emit objectSelectionChanged( obj->id() );
break;
// target
case 3:
obj->target( _value.toBool() );
emit objectSelectionChanged( obj->id() );
break;
default:
......
......@@ -80,7 +80,6 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
// BaseInterface
void updateView();
void updatedObject(int);
void objectSelectionChanged(int);
void objectPropertiesChanged(int);
void setSlotDescription(QString _slotName, QString _slotDescription,
......
......@@ -191,8 +191,6 @@ void DataControlPlugin::setTarget( int objectId, bool _target ) {
BaseObjectData* object;
if ( PluginFunctions::getObject(objectId,object) ){
object->target( _target );
emit objectSelectionChanged( object->id() );
}
}
......@@ -209,8 +207,6 @@ void DataControlPlugin::setSource( int objectId, bool _source ) {
BaseObjectData* object;
if ( PluginFunctions::getObject(objectId,object) ){
object->source( _source );
emit objectSelectionChanged( object->id() );
}
}
......@@ -340,7 +336,6 @@ void DataControlPlugin::groupObjects(idList _objectIDs, QString _groupName) {
groupItem->source(source);
emit objectPropertiesChanged( groupItem->id() );
emit objectSelectionChanged ( groupItem->id() );
}
......@@ -362,8 +357,6 @@ void DataControlPlugin::setAllTarget() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS, type) ;
o_it != PluginFunctions::objectsEnd(); ++o_it){
o_it->target(true);
emit objectSelectionChanged( o_it->id() );
}
}
......@@ -386,8 +379,6 @@ void DataControlPlugin::setAllSource() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS, type) ;
o_it != PluginFunctions::objectsEnd(); ++o_it){
o_it->source(true);
emit objectSelectionChanged( o_it->id() );
}
}
......@@ -410,8 +401,6 @@ void DataControlPlugin::clearAllTarget() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS, type) ;
o_it != PluginFunctions::objectsEnd(); ++o_it){
o_it->target(false);
emit objectSelectionChanged( o_it->id() );
}
}
......@@ -434,8 +423,6 @@ void DataControlPlugin::clearAllSource() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS, type) ;
o_it != PluginFunctions::objectsEnd(); ++o_it){
o_it->source(false);
emit objectSelectionChanged( o_it->id() );
}
}
......
......@@ -248,7 +248,6 @@ void DataControlPlugin::slotGroup() {
groupItem->source(source);
emit objectPropertiesChanged( groupItem->id() );
emit objectSelectionChanged ( groupItem->id() );
}
......
......@@ -69,14 +69,9 @@ void SelectionPlugin::toggleSelection(QMouseEvent* _event)
// OBJECT SELECTION
if (selectionType_ & OBJECT){
if (sourceSelection_){
object->source( !object->source() );
emit objectSelectionChanged(object->id());
} else {
object->target( !object->target() );
emit objectSelectionChanged(object->id());
}
}
......@@ -497,11 +492,8 @@ void SelectionPlugin::handleLassoSelection(QMouseEvent* _event, bool _volume) {
{
if (sourceSelection_){
object->source( !deselection_ );
emit objectSelectionChanged(object->id());
} else {
object->target( !deselection_ );
emit objectSelectionChanged(object->id());
}
}
}
......@@ -664,10 +656,8 @@ bool SelectVolumeAction::operator()(BaseNode* _node, ACG::GLState& _state)
if (plugin_->sourceSelection_){
object->source( !plugin_->deselection_ );
emit plugin_->objectSelectionChanged( object->id() );
} else {
object->target( !plugin_->deselection_ );
emit plugin_->objectSelectionChanged( object->id() );
}
} else if (selected)
......
......@@ -119,7 +119,6 @@ class SelectionPlugin : public QObject, BaseInterface , MouseInterface, KeyInter
//BaseInterface
void updateView();
void updatedObject(int);
void objectSelectionChanged(int);
//PickingInterface
void addHiddenPickMode( const std::string _mode );
......
Supports Markdown
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