- changed some status bar messages

- New feature: added the capability to view the source code of the Gerber/Excellon file that was loaded into the app. The file is also stored as an object attribute for later use. THe view option is in the project context menu and in Menu -> Options -> View Source
This commit is contained in:
Marius Stanciu
2019-02-16 19:47:50 +02:00
committed by Marius S
parent a7398961c7
commit 326599e4a3
10 changed files with 98 additions and 26 deletions

View File

@@ -504,6 +504,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
sel = len(self.view.selectedIndexes()) > 0
self.app.ui.menuprojectenable.setEnabled(sel)
self.app.ui.menuprojectdisable.setEnabled(sel)
self.app.ui.menuprojectviewsource.setEnabled(sel)
self.app.ui.menuprojectcopy.setEnabled(sel)
self.app.ui.menuprojectedit.setEnabled(sel)
self.app.ui.menuprojectdelete.setEnabled(sel)
@@ -514,6 +516,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
self.app.ui.menuprojectgeneratecnc.setVisible(True)
self.app.ui.menuprojectedit.setVisible(True)
self.app.ui.menuprojectsave.setVisible(True)
self.app.ui.menuprojectviewsource.setVisible(True)
for obj in self.get_selected():
if type(obj) != FlatCAMGeometry:
@@ -522,6 +525,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
self.app.ui.menuprojectedit.setVisible(False)
if type(obj) != FlatCAMGeometry and type(obj) != FlatCAMExcellon and type(obj) != FlatCAMCNCjob:
self.app.ui.menuprojectsave.setVisible(False)
if type(obj) != FlatCAMGerber and type(obj) != FlatCAMExcellon:
self.app.ui.menuprojectviewsource.setVisible(False)
else:
self.app.ui.menuprojectgeneratecnc.setVisible(False)