- made the Rules Check Tool document window Read Only

This commit is contained in:
Marius Stanciu 2019-10-06 04:46:25 +03:00 committed by Marius
parent fa7511e129
commit ce9c15a2ed
3 changed files with 16 additions and 1 deletions

View File

@ -6692,6 +6692,8 @@ class FlatCAMDocument(FlatCAMObj):
self.document_editor_tab = None
self._read_only = False
def set_ui(self, ui):
FlatCAMObj.set_ui(self, ui)
FlatCAMApp.App.log.debug("FlatCAMDocument.set_ui()")
@ -6730,7 +6732,7 @@ class FlatCAMDocument(FlatCAMObj):
# first clear previous text in text editor (if any)
self.document_editor_tab.code_editor.clear()
self.document_editor_tab.code_editor.setReadOnly(False)
self.document_editor_tab.code_editor.setReadOnly(self._read_only)
self.document_editor_tab.buttonRun.hide()
@ -6790,6 +6792,17 @@ class FlatCAMDocument(FlatCAMObj):
self.build_ui()
@property
def read_only(self):
return self._read_only
@read_only.setter
def read_only(self, val):
if val:
self._read_only = True
else:
self._read_only = False
def build_ui(self):
FlatCAMObj.build_ui(self)
tab_here = False

View File

@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
- remade the Mark area Tool in Gerber Editor to be able to clear the markings and also to delete the marked polygons (Gerber apertures)
- working in adding to the Optimal Tool the rest of the distances found in the Gerber and the locations associated; added GUI
- added display of the results for the Rules Check Tool in a formatted way
- made the Rules Check Tool document window Read Only
5.10.2019

View File

@ -1415,6 +1415,7 @@ class RulesCheck(FlatCAMTool):
txt += '%s\n' % _("Violations: There are no violations for the current rule.")
txt += '\n\n'
new_obj.source_file = txt
new_obj.read_only = True
self.app.new_object('document', name='Rules Check results', initialize=init, plot=False )