if filename:
self.components['editor'].load_from_file(filename)
self.components['editor'].triggerRerender.emit(True)
With the above change, cq-editor file.py renders file.py without user intervention, but the object is too small. I suspect the fit (Shift-F1) runs too early. Here's a screenshot:
cq-editor file.py
should runfile.py
without having to press F5. This change would make it more like freecad.cq-editor loads the file with this code. I changed it to also do what F5 does:
With the above change,
cq-editor file.py
renders file.py without user intervention, but the object is too small. I suspect the fit (Shift-F1) runs too early. Here's a screenshot: