Commit 00bc7bab authored by David Bommes's avatar David Bommes
Browse files

fixed double datacontrol entry bug

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7318 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3c1c6d24
......@@ -447,6 +447,13 @@ void TreeModel::objectChanged(int _id) {
*/
void TreeModel::objectAdded(BaseObject* _object){
// check if item already in model tree
// this function can be called by addEmpty and fileOpened
// both will be called by fileOpened such that the item
// already exists
if( rootItem_->childExists( _object->id() ))
return;
TreeItem* parent = 0;
//find the parent
if ( _object->parent() == PluginFunctions::objectRoot() )
......@@ -454,7 +461,6 @@ void TreeModel::objectAdded(BaseObject* _object){
else
parent = rootItem_->childExists( _object->parent()->id() );
if (parent != 0){
QModelIndex parentIndex = getModelIndex(parent, 0);
......
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