Commit 6a0516c0 authored by Dirk Wilden's avatar Dirk Wilden

fixed the last remaining bug (at least i hope it was the last)

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6068 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 358caedd
......@@ -237,7 +237,7 @@ void DataControlPlugin::slotGroup() {
groupItem->source(source);
emit visibilityChanged( groupItem->id() );
// emit objectPropertiesChanged( groupItem->id() );
emit objectPropertiesChanged( groupItem->id() );
emit objectSelectionChanged ( groupItem->id() );
}
......
......@@ -492,8 +492,6 @@ void TreeModel::objectDeleted(int _id){
*/
void TreeModel::moveItem(TreeItem* _item, TreeItem* _parent ){
std::cerr << "Move Item " << _item->name().toStdString() << " from " << _item->parent()->name().toStdString() << " to " << _parent->name().toStdString() << std::endl;
QModelIndex itemIndex = getModelIndex(_item, 0);
QModelIndex oldParentIndex = itemIndex.parent();
QModelIndex newParentIndex = getModelIndex(_parent, 0);
......@@ -506,16 +504,12 @@ void TreeModel::moveItem(TreeItem* _item, TreeItem* _parent ){
endRemoveRows();
//insert it at the new location
beginInsertRows(newParentIndex, _parent->childCount(), _parent->childCount()); //insert at the bottom
beginInsertRows(newParentIndex, _parent->childCount(), _parent->childCount() ); //insert at the bottom
_item->setParent( _parent );
_parent->appendChild( _item );
endInsertRows();
if ( newParentIndex.isValid() )
dataChanged(newParentIndex, newParentIndex);
emit layoutChanged();
}
//******************************************************************************
......
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