mmikeww / AHK-v2-script-converter

AHK v1 -> v2 script converter
https://autohotkey.com/boards/viewtopic.php?f=6&t=25100
The Unlicense
581 stars 44 forks source link

Fix MenuBar detection and initialization #229

Closed andymbody closed 4 months ago

andymbody commented 4 months ago

Fix MenuBar detection and initialization - also fixed 2 failed tests, Menu_ex6, Menu_ex7 I don't know if this is related to any other posted issues. Apparently I pushed this shortly after you made a merge. Let me know if I need to update my local and resubmit. Also submitted fix for QuickConverter gui controls being clipped during initialization on some screen resolutions.

Banaanae commented 4 months ago

Apparently I pushed this shortly after you made a merge.

No worries git handles this It's much easier to see what happens when simplified (so I'll try my best :D) Let's say on the main repo we have this file

Var1 := False
Var2 := "MyValue"
Var3 := False

You then make a PR changing Var3 to True and I make a commit changing Var1 to True before I merge your PR, when I go to merge your PR git sees that you only changed Var3, so despite there being differences in the value of Var1, git only changes the lines that were changed in your local repo. (Hopefully this is coherent :)

Issues only happen when the same line is changed, imagine the same scenario as above, but I change Var2 to "Test" and in your PR you change Var2 to "MyTest", git sees that it should change Var2 := "MyValue" to Var2 := "MyTest", but then it sees that it has already been changed toVar2 := "Test"`, it doesn't know which line to keep so a merge conflict is created.

The reason #223 rolled back a few commits is because they downloaded the file (rather than cloning with git) and while the changes were being made your PR got merged, so when the downloaded file was uploaded to github saw that all this code (which was commited after the file was downloaded) has been deleted, so it showed up that way.

If the comparison between the last two paragraph didn't make sense, essentially git tracks the changes made to a file, and then makes those changes on the head repo when made, if a file is downloaded, git can't tell the difference between ode being deleted or being lost because is was commited after the file was downloaded, so it assumes the former.

I'll get testing now

I don't know if this is related to any other posted issues.

Never got around to making one - whoops

andymbody commented 4 months ago

(Hopefully this is coherent :)

Yes, very clear, thank you for your help and taking the time to lay it out for me.

Banaanae commented 4 months ago

Also submitted fix for QuickConverter gui controls being clipped during initialization on some screen resolutions.

@andymbody what were those screen resolutions? The fix makes saving sizes not work anymore, I am working on a fix but don't want to break your fixes See #244

andymbody commented 4 months ago

The adjustment in QC are unrelated to my fix. I adjusted them so it would fit my screen I must have forgotten to remove the adjustment. The original should be commented out if you want to uncomment it.

Update... I guess I am mistaken... I submitted a commit with this adjustment. You can remove it if it causes issues.