File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -375,24 +375,24 @@ void MacroTreeModel::Add(std::shared_ptr<Macro> item)
375
375
376
376
void MacroTreeModel::Remove (std::shared_ptr<Macro> item)
377
377
{
378
- auto startIdx = GetItemModelIndex (item);
379
- if (startIdx == -1 ) {
378
+ auto uiStartIdx = GetItemModelIndex (item);
379
+ if (uiStartIdx == -1 ) {
380
380
return ;
381
381
}
382
- auto macroStartIdx = ModelIndexToMacroIndex (startIdx , _macros);
382
+ auto macroStartIdx = ModelIndexToMacroIndex (uiStartIdx , _macros);
383
383
384
- auto endIdx = startIdx ;
384
+ auto uiEndIdx = uiStartIdx ;
385
385
auto macroEndIdx = macroStartIdx;
386
386
387
387
bool isGroup = item->IsGroup ();
388
388
if (isGroup) {
389
389
macroEndIdx += item->GroupSize ();
390
390
if (!item->IsCollapsed ()) {
391
- endIdx = item->GroupSize ();
391
+ uiEndIdx + = item->GroupSize ();
392
392
}
393
393
}
394
394
395
- beginRemoveRows (QModelIndex (), startIdx, endIdx );
395
+ beginRemoveRows (QModelIndex (), uiStartIdx, uiEndIdx );
396
396
_macros.erase (std::next (_macros.begin (), macroStartIdx),
397
397
std::next (_macros.begin (), macroEndIdx + 1 ));
398
398
endRemoveRows ();
You can’t perform that action at this time.
0 commit comments