1- VERSION = '008.062 '
1+ VERSION = '008.063 '
22LCNCVER = '2.10'
33
44'''
@@ -482,8 +482,6 @@ def initialized__(self):
482482 if not os .path .isfile (updateLog ):
483483 with open (updateLog , 'w' ) as f :
484484 f .write (f'{ time .strftime ("%y-%m-%d" )} Initial V{ LCNCVER } -{ VERSION } \n ' )
485- # the gcodegraphics_patch cannot apply until the gcodegraphics widget is initialized
486- self .gcodegraphics_patch ()
487485 self .startupTimer .start (250 )
488486 # turning off autorepeat should always be the last thing intialized__ does
489487 self .autorepeat_keys (False )
@@ -498,7 +496,7 @@ def before_loop__(self):
498496
499497#########################################################################################################################
500498# CLASS PATCHING SECTION #
501- # note that the gcodegraphics_patch is called after the widgets have initialized
499+ # note that the widget must be initialized before it can be patched (Example: gcodegraphics needs patched later)
502500#########################################################################################################################
503501
504502 # called by qtvcp.py
@@ -780,25 +778,6 @@ def new_process_error(self, w, kind, text):
780778 STATUS .emit ('play-sound' , 'SPEAK %s ' % text )
781779 STATUS .emit ('update-machine-log' , text , 'TIME' )
782780
783- # patched gcodegraphics functions
784- def gcodegraphics_patch (self ):
785- ''' required for gcodegraphics only
786- conversational is always Z view '''
787- self .old_draw_grid = self .w .gcodegraphics .draw_grid
788- self .w .gcodegraphics .draw_grid = self .new_draw_grid
789-
790- # allows grid to be drawn in P view in gcodegraphics
791- def new_draw_grid (self ):
792- rotation = math .radians (STATUS .stat .rotation_xy % 90 )
793- # permutation = lambda x_y_z2: (x_y_z2[0], x_y_z2[1], x_y_z2[2]) # XY Z
794-
795- def permutation (x_y_z2 ):
796- return x_y_z2 [0 ], x_y_z2 [1 ], x_y_z2 [2 ] # XY Z
797- # inverse_permutation = lambda x_y_z3: (x_y_z3[0], x_y_z3[1], x_y_z3[2]) # XY Z
798-
799- def inverse_permutation (x_y_z3 ):
800- return x_y_z3 [0 ], x_y_z3 [1 ], x_y_z3 [2 ] # XY Z
801- self .w .gcodegraphics .draw_grid_permuted (rotation , permutation , inverse_permutation )
802781
803782#########################################################################################################################
804783# SPECIAL FUNCTIONS SECTION #
0 commit comments