Added option to show pixel rules with a width of 64 pixel.
The config setting is saved to the document.
This implements the feature described in
Added option to show pixel rules with a width of 64 pixel.
The config setting is saved to the document.
This implements the feature described in
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Hi, @zachmann!
I have tested your patch and there seems to be a few bugs/features (I don't understand :) ):
As far as I can guess, only px should use this multiplier...
Here is a video recording showing the issue (when I close the file the canvas is not updated, it is a known bug of my video driver):
I have tested your patch and there seems to be a few bugs/features (I don't understand :) ):
- When enabling "Multiple of 2" mode, I cannot see the logic, which units use it, and which not... As far as I can see:
- px, pt, cm, mm --- use multiples of two
- pi, cc, in --- don't use the multiple
As far as I can guess, only px should use this multiplier...
The feature is only there for pixel. The other units don't use it. It is just that the show the values but that they do also without t
- When saving/reloading the image, the option is not activated. I don't know why. I can see the code doing some XML saving in the patch, but it seems it fails to pass this value to the GUI
The problem was that the stuff was only saved when guides where used.
- If we save "use multiple of 2" value to .kra file, I guess we should also save the choice of the unit... It was not in the original task, but I guess it would be logical.
This is the question. The show rulers seems to be saved in the krita config and not saved int document as the multiple of two. Should this and the unit saved in the document?
Here is a video recording showing the issue (when I close the file the canvas is not updated, it is a known bug of my video driver):
Save the guides and the multiple of two when there are changes to the config. This also fixes the problem that the Show guides, Snap to guides, Lock guides was only saved when the there was a guide in the document.
- When enabling "Multiple of 2" mode, I cannot see the logic, which units use it, and which not... As far as I can see:
- px, pt, cm, mm --- use multiples of two
- pi, cc, in --- don't use the multiple
The feature is only there for pixel. The other units don't use it. It is just that the show the values but that they do also without t
It sounds like a bug :(
- If we save "use multiple of 2" value to .kra file, I guess we should also save the choice of the unit... It was not in the original task, but I guess it would be logical.
This is the question. The show rulers seems to be saved in the krita config and not saved int document as the multiple of two. Should this and the unit saved in the document?
I guess both the options (unit and use-power-of-two) should be saved into .kra. If you really like it, you can make KisConfig store the last manually switched by the user value and use it as the default for newly cretaed documents. That would be the best option from usability point of view. Right now, power-of-two option seem to be saved/loaded correctly (tested), but the units not (obvoiusly)
There is still one blocking bug with the power-of-two option:
Now you see the first document, with the rulers' units rendered as if the power-of-two option is enabled, although it is not enabled.
Hi, @zachmann!
The patch looks and works perfectly fine now! Please push!
And thank you very much for your work! :)