Narrat / Pim

PyGObject based image viewer with vim-like keybindings
MIT License
28 stars 9 forks source link

rotation lock #17

Closed aeosynth closed 8 years ago

aeosynth commented 8 years ago

my attempt

Narrat commented 8 years ago

Working far better than my first attempt. :) Only thing I would like to change is the else part, which resets self.rotation. Instead of everytime setting it to 0, if the rotation isn't locked, I would move it into the toggle function. As far as I could deduce its working the same. (Although the only reason for this adjustment is personal taste) Or is there a reason, why it should be there?

aeosynth commented 8 years ago

that doesn't make sense to me - toggling rotation lock should not affect the current rotation. resetting the rotation to 0 when lock is toggled will make self.rotation out of sync with image's actual rotation.

edit: the 'lock' part is for locking rotation across images, not for a single image. that's like resetting zoom every time zoom_lock is toggled.

Narrat commented 8 years ago

ok, this would malform "rotate, lock, rotate again, moving picture forward" (intended 180°, getting only 90°). Didn't check that, obviously