ricardoquesada / vchar64

editor for the Commodore 64
http://retro.moe/tag/vchar64/
Other
91 stars 12 forks source link

adds xlink paste support and fixes xlink multicolor mode switching #5

Closed hbekel closed 8 years ago

hbekel commented 8 years ago

This pull request introduces the signal bytesUpdated(int pos, int count) which can be emitted when a range of consecutive bytes in the charset changes. It is emitted during State::paste for each consecutive range of bytes and is handled by Preview::bytesUpdated, which transfers the corresponding bytes to C64 memory. Thus all paste actions are reflected on the C64.

In addition, PasteCommand::undo has been refactored to also use the State::paste method instead of simply copying back the whole _origBuffer to the charset. The reverse operation of the original paste is performed by constructing a temporary State::CopyRange and using the original _charIndex as the offset. This way the charset does not need to be transferred to the C64 as a whole for each undo of a paste (which would have been the method corresponding to the existing implementation).

I have also (re)connected both colorPropertiesUpdated and multicolorModeChanged signals to Preview::colorPropertiesChanged in order to reenable switching between color modes on the C64.

ricardoquesada commented 8 years ago

thanks. merged