Support selected range, keep layers - #7
Conversation
If some text is selected, change only the selected part. Otherwise, change case of the whole tab. Use tab.layers instead of tab.text to keep layers.
A little typo fixed
There was a problem hiding this comment.
I really appreciate your collaboration with this plugin! When I wrote this plugin is was just starting to code and applying some of the Python I learnt at TypeMedia to my first group of scripts and plugins.
I'm sure you've tested and worked with this new feature. I'll just add @mekkablue as a reviewer as well just in case we are missing a small detail. Otherwise, the way of storing layers in an array and display them looks great to me.
Again, thank you so much!
| newText = "" | ||
|
|
||
| # change the whole tab | ||
| if tab.textRange == 0: |
There was a problem hiding this comment.
I didn't know about this textRange property. I'm currently focused on other programming projects not related to type design at this moment so I'll need to catch up on Glyphs 3 and its API.
Maybe @mekkablue can give some feedback because I would like to keep this plugin working for Glyphs 2 for a bit longer.
There was a problem hiding this comment.
It seem to work fine in Glyphs 2 as well!
If some text is selected, change only the selected part. Otherwise, change case of the whole tab.
Use tab.layers instead of tab.text to keep layers (since tabs can contain multiple layers).