FreeCAD / FreeCAD-macros

A repository for FreeCAD macros
https://freecad.org/wiki/Macros_recipes
156 stars 139 forks source link

Camera.FCMacro - invalid line split at 1335-6 #140

Closed kenhia closed 2 years ago

kenhia commented 2 years ago

https://github.com/FreeCAD/FreeCAD-macros/blob/29c73ca90f4c3716f120a2e89ebdd698bbf9a463/PureGui/Camera.FCMacro#L1335

NB: I'm a FreeCAD newbie, so I may be holding things wrong, but...

Lines 1335-6 have a bad string split:

            App.Console.PrintMessage("Refresh (3Dview = X " + str(ori_Horizont) + ",
                                                        Y " + str(ori_Vertical) + ") " + "\n")

the final double-quote on 1335 is not closed until the next line. Fixed in my copy by just making 1335-6 into one line:

            App.Console.PrintMessage("Refresh (3Dview = X " + str(ori_Horizont) + ", Y " + str(ori_Vertical) + ") " + "\n")

Could also be fixed by moving the ", to 1336 to produce:

            App.Console.PrintMessage("Refresh (3Dview = X " + str(ori_Horizont) + 
                                                        ", Y " + str(ori_Vertical) + ") " + "\n")
luzpaz commented 2 years ago

Thanks, can you make a PR ?

kenhia commented 2 years ago

Thanks, can you make a PR ?

Created - https://github.com/FreeCAD/FreeCAD-macros/pull/141

galou commented 2 years ago

Thanks for the fix!

luzpaz commented 2 years ago

TY @kenhia and @galou (commit: f903939)
Closed.