MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / RemoveItem

Method RemoveItem

customWidgets.cpp:280–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void singleSelectGroup::RemoveItem(selectionItem *item){
281 int id = selections.indexOf(item);
282 if(id < 0) return;
283 selections.erase(selections.begin() + id);
284 mainLayout->removeWidget(item);
285 item->setParent(nullptr);
286 item->deleteLater();
287 this->setFixedHeight(this->height() - middleSpacing - item->height());
288 if(selections.size() == 0)
289 selectedID = -1;
290 else{
291 selectedID = id < selections.size() ? id : id - 1;
292 selections[selectedID]->Select();
293 }
294 emit selectedItemChange(selectedID);
295 emit itemChange();
296}
297
298void singleSelectGroup::SetSelection(selectionItem *item){
299 int id = selections.indexOf(item);

Callers 1

InitMethod · 0.80

Calls 2

removeWidgetMethod · 0.80
SelectMethod · 0.80

Tested by

no test coverage detected