| 254 | } |
| 255 | |
| 256 | void HexWidget::setSelection(int addr) { |
| 257 | if ((addr /= 2) < 0) { |
| 258 | addr = 0; |
| 259 | } |
| 260 | |
| 261 | if (m_selectStart == -1) { |
| 262 | m_selectStart = addr; |
| 263 | m_selectEnd = addr; |
| 264 | m_selectLen = 0; |
| 265 | } |
| 266 | if (addr > m_selectStart) { |
| 267 | m_selectEnd = addr; |
| 268 | m_selectLen = addr - m_selectStart + 1; |
| 269 | } else { |
| 270 | m_selectStart = addr; |
| 271 | m_selectLen = m_selectEnd - addr + 1; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | void HexWidget::undo() { |
| 276 | if (!m_stack.isEmpty()) { |
nothing calls this directly
no outgoing calls
no test coverage detected