Commit 720aee31 authored by Jan Möbius's avatar Jan Möbius

Datacontrol speedup, only handle lightsources in file opened, if they are added



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15197 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 68dad684
...@@ -359,8 +359,11 @@ void DataControlPlugin::fileOpened(int _id){ ...@@ -359,8 +359,11 @@ void DataControlPlugin::fileOpened(int _id){
if ( PluginFunctions::getObject(_id, obj) ) if ( PluginFunctions::getObject(_id, obj) )
model_->objectAdded(obj); model_->objectAdded(obj);
slotShowLightSources(tool_->lightSources->checkState()); // Only if the added object was a light source, we will traverse the objects!
if ( obj->dataType() == DATA_LIGHT)
slotShowLightSources(tool_->lightSources->checkState());
view_->resizeColumnToContents(0); view_->resizeColumnToContents(0);
} }
......
...@@ -492,9 +492,9 @@ void TreeModel::objectAdded(BaseObject* _object){ ...@@ -492,9 +492,9 @@ void TreeModel::objectAdded(BaseObject* _object){
beginInsertRows(parentIndex, parent->childCount(), parent->childCount()); //insert at the bottom beginInsertRows(parentIndex, parent->childCount(), parent->childCount()); //insert at the bottom
TreeItem* item = new TreeItem( _object->id(), _object->name(), _object->dataType(), parent); TreeItem* item = new TreeItem( _object->id(), _object->name(), _object->dataType(), parent);
parent->appendChild( item ); parent->appendChild( item );
endInsertRows(); endInsertRows();
} }
......
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