void KbPerf::popDpi(quint64 pushIdx){ if(pushIdx == 0 || !pushedDpis.contains(pushIdx)) return; pushedDpis.remove(pushIdx); // Set the DPI to the last-pushed value still on the stack _curDpi(map_last(pushedDpis)); // If all values have been popped, remove the original DPI if(pushedDpis.count() == 1) pushedDpis.clear(); _needsUpdate = _needsSave = true; }
void KbPerf::popDpi(quint64 pushIdx){ if(!pushedDpis.contains(pushIdx)) { return; } pushedDpis.remove(pushIdx); if (pushedDpis.isEmpty()) { _curDpi(dpi(dpiBaseIdx)); } else { // Set the DPI to the last-pushed value still on the stack _curDpi(map_last(pushedDpis)); } _needsUpdate = _needsSave = true; }