- added a fix so the app close is now clean, with exit code 0 as set

This commit is contained in:
Marius Stanciu
2020-05-07 00:46:02 +03:00
committed by Marius
parent a161354c25
commit 4ece23c456
5 changed files with 21 additions and 42 deletions

View File

@@ -491,27 +491,3 @@ class ExclusionAreas:
FlatCAMTool.delete_moving_selection_shape(self)
self.app.delete_selection_shape()
FlatCAMTool.delete_tool_selection_shape(self, shapes_storage=self.exclusion_shapes)
class InvertHexColor:
"""
Will invert a hex color made out of 3 chars or 6 chars
From here: http://code.activestate.com/recipes/527747-invert-css-hex-colors/
"""
def __init__(self):
self.p6 = re.compile("#[0-9a-f]{6};", re.IGNORECASE)
self.p3 = re.compile("#[0-9a-f]{3};", re.IGNORECASE)
def modify(self, original_color=3):
code = {}
l1 = "#;0123456789abcdef"
l2 = "#;fedcba9876543210"
for i in range(len(l1)):
code[l1[i]] = l2[i]
inverted = ""
content = p6.sub(modify, content)
content = p3.sub(modify, content)
return inverted