mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsForm: fix position of inserted item
It's not enough to insert an item object only. Also properties like
parent and index must be defined to inserted item to ensure that
positions are calculated correctly.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 75fe48043e
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-06-23 (Sun, 23 Jun 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -231,8 +231,13 @@ void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_I
|
|||||||
#ifdef DEBUG_CC
|
#ifdef DEBUG_CC
|
||||||
printf("[CComponentsForm] %s insert cc_Item not possible, v_cc_items is empty, cc_Item added\n", __FUNCTION__);
|
printf("[CComponentsForm] %s insert cc_Item not possible, v_cc_items is empty, cc_Item added\n", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
}else
|
}else{
|
||||||
v_cc_items.insert(v_cc_items.begin()+cc_item_id, cc_Item);
|
v_cc_items.insert(v_cc_items.begin()+cc_item_id, cc_Item);
|
||||||
|
cc_Item->setParent(this);
|
||||||
|
//assign item index
|
||||||
|
int index = genIndex();
|
||||||
|
cc_Item->setIndex(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsForm::removeCCItem(const uint& cc_item_id)
|
void CComponentsForm::removeCCItem(const uint& cc_item_id)
|
||||||
|
Reference in New Issue
Block a user