MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / undo

Method undo

src/commands.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void CharCommand::undo()
57{
58 switch (_cmd)
59 {
60 case insert:
61 _chunks->removeAt(_charPos);
62 break;
63 case overwrite:
64 _chunks->overwrite(_charPos, _oldChar);
65 _chunks->setDataChanged(_charPos, _wasChanged);
66 break;
67 case removeAt:
68 _chunks->insert(_charPos, _oldChar);
69 _chunks->setDataChanged(_charPos, _wasChanged);
70 break;
71 }
72}
73
74void CharCommand::redo()
75{

Callers

nothing calls this directly

Calls 4

setDataChangedMethod · 0.80
removeAtMethod · 0.45
overwriteMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected