I have submitted a pull request for the Vewrendered3 plugin.
I updated devel on my repo a few minutes ago to be level with Leo's devel, and merged VR3 into it. Then I made a new pull request. I hope that's what you need. Otherwise I'll need a bit of handholding...
Can I just clone a branch of the Leo repo? I thought - at least, using Github Desktop - that I could only get the whole repo with all its branches.
What I don't know is whether I can re-clone the Leo repo since I've already got one. ... Maybe if I start with a new location on my hard drive...
Git's branching and merging always confuses me, let alone across forks. Meaning: don't feel bad, you're not alone!The network graph at https://github.com/tbpassin/leo-editor/network shows your VR3 branch (top black line for me) as starting in the middle of nowhere, not rooted to any Leo branch. Maybe this has something to do with it?
Thanks for the encouragement.
I did start a new VR3 branch in my clone. That's what you are supposed to do to work on a new feature.
Still, I don't see why just copying the final files over into devel (on my clone) wouldn't have worked.
md code-test
cd code-test
git clone --depth=1 https://github.com/tbpassin/leo-editor.git/ -b VR3 leo-vr3
xcopy leo-vr3\leo\plugins\viewrendered3.py ..\leo-editor\leo\plugins\
xcopy leo-vr3\leo\plugins\viewrendered\* ..\leo-editor\leo\plugins\viewrendered\
xcopy leo-vr3\leo\plugins\qt_gui.py ..\leo-editor\leo\plugins\
I think that between the time that I modified qt_gui.py and the time that I pushed it to my clone of the devel branch, that it got reformatted in origin/ devel. Between my VR3 branch and my devel branch, I see many changes in the file diffs - I'm sure they are what Edward noticed - that are minor reformatting differences, like an extra space before or after a "#" character, or an argument broken over to the next line. This makes me think that someone had run the new automatic reform script over the entire branch.I completely understand why no one would want to slog through so many of these changes to verify that they are harmless. I'll work out how to recover, and go on from there.
Thanks, Ed,I have not been able to get my repo on GitHub straightened out so that you won't see large diffs in qt_gui.py from all those formatting changes. So I've attached a zip file with my files and the new plugins/viewrendered3 directory that contains two stylesheets. Would you please just add them so we can get this done?
Thank you, Edward!
pc = g.app.pluginsController
# Load viewrendered (and call vr.onCreate) *only* if not already loaded.
if (
not pc.isLoaded('viewrendered.py')
and not pc.isLoaded('viewrendered2.py')
and not pc.isLoaded('viewrendered3.py')
):
vr = pc.loadOnePlugin('viewrendered.py')
if vr:
g.blue('viewrendered plugin loaded.')
vr.onCreate('tag', {'c': c})Your version of qt_gui was way out of date, so I made the change by hand. The new code is:
In future, please run pylint on your code. It will catch these kinds of things.
On Sunday, March 15, 2020 at 11:35:26 AM UTC-4, Edward K. Ream wrote:In future, please run pylint on your code. It will catch these kinds of things.I thought that pyflakes was doing that job now.
Now that's funny. I just imported qt_gui.py in my Leo outline - the same qt_gui.py file I zipped up for you - and neither pyflakes nor pylint found anything to complain about. Maybe your pylint settings are different from mine. I *think* I'm using whatever you set up for Leo 6.1. I don't recall that I changed any of those settings.