MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / setSelection

Method setSelection

gui/qt/debugger/hexwidget.cpp:256–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void 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
275void HexWidget::undo() {
276 if (!m_stack.isEmpty()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected