- now the Edit command (either from Menu Edit ->Edit Object) or through the shortcut key (E key) or project tab context menu works also for the CNCJob objects (will open a text Editor with the GCode)
This commit is contained in:
parent
0aeef246ea
commit
18e128c57b
|
@ -14,6 +14,7 @@ CHANGELOG for FlatCAM beta
|
||||||
- solved the issue with the GUI in the Notebook being expanded too much in width due of the FCDoubleSpinner and FCSpinner sizeHint by setting the sizePolicy to Ignored value
|
- solved the issue with the GUI in the Notebook being expanded too much in width due of the FCDoubleSpinner and FCSpinner sizeHint by setting the sizePolicy to Ignored value
|
||||||
- fixed the workspace being always A4
|
- fixed the workspace being always A4
|
||||||
- added a label in the status bar to show if the workplace is active and what size it is
|
- added a label in the status bar to show if the workplace is active and what size it is
|
||||||
|
- now the Edit command (either from Menu Edit ->Edit Object) or through the shortcut key (E key) or project tab context menu works also for the CNCJob objects (will open a text Editor with the GCode)
|
||||||
|
|
||||||
16.05.2020
|
16.05.2020
|
||||||
|
|
||||||
|
|
|
@ -2134,7 +2134,7 @@ class App(QtCore.QObject):
|
||||||
|
|
||||||
def object2editor(self):
|
def object2editor(self):
|
||||||
"""
|
"""
|
||||||
Send the current Geometry or Excellon object (if any) into the it's editor.
|
Send the current Geometry, Gerber, Excellon object or CNCJob (if any) into the it's editor.
|
||||||
|
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
@ -2146,10 +2146,10 @@ class App(QtCore.QObject):
|
||||||
edited_object = self.collection.get_active()
|
edited_object = self.collection.get_active()
|
||||||
|
|
||||||
if isinstance(edited_object, GerberObject) or isinstance(edited_object, GeometryObject) or \
|
if isinstance(edited_object, GerberObject) or isinstance(edited_object, GeometryObject) or \
|
||||||
isinstance(edited_object, ExcellonObject):
|
isinstance(edited_object, ExcellonObject) or isinstance(edited_object, CNCJobObject):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Select a Geometry, Gerber or Excellon Object to edit."))
|
self.inform.emit('[WARNING_NOTCL] %s' % _("Select a Geometry, Gerber, Excellon or CNCJob Object to edit."))
|
||||||
return
|
return
|
||||||
|
|
||||||
if isinstance(edited_object, GeometryObject):
|
if isinstance(edited_object, GeometryObject):
|
||||||
|
@ -2213,6 +2213,14 @@ class App(QtCore.QObject):
|
||||||
edited_object.ui_build = False
|
edited_object.ui_build = False
|
||||||
edited_object.build_aperture_storage = False
|
edited_object.build_aperture_storage = False
|
||||||
|
|
||||||
|
elif isinstance(edited_object, CNCJobObject):
|
||||||
|
|
||||||
|
if self.ui.splitter.sizes()[0] == 0:
|
||||||
|
self.ui.splitter.setSizes([1, 1])
|
||||||
|
|
||||||
|
edited_object.on_edit_code_click()
|
||||||
|
return
|
||||||
|
|
||||||
# make sure that we can't select another object while in Editor Mode:
|
# make sure that we can't select another object while in Editor Mode:
|
||||||
# self.collection.view.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
|
# self.collection.view.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
|
||||||
self.ui.project_frame.setDisabled(True)
|
self.ui.project_frame.setDisabled(True)
|
||||||
|
|
|
@ -382,8 +382,9 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||||
|
|
||||||
if type(obj) != GeometryObject:
|
if type(obj) != GeometryObject:
|
||||||
self.app.ui.menuprojectgeneratecnc.setVisible(False)
|
self.app.ui.menuprojectgeneratecnc.setVisible(False)
|
||||||
if type(obj) != GeometryObject and type(obj) != ExcellonObject and type(obj) != GerberObject:
|
# if type(obj) != GeometryObject and type(obj) != ExcellonObject and type(obj) != GerberObject or \
|
||||||
self.app.ui.menuprojectedit.setVisible(False)
|
# type(obj) != CNCJobObject:
|
||||||
|
# self.app.ui.menuprojectedit.setVisible(False)
|
||||||
if type(obj) != GerberObject and type(obj) != ExcellonObject and type(obj) != CNCJobObject:
|
if type(obj) != GerberObject and type(obj) != ExcellonObject and type(obj) != CNCJobObject:
|
||||||
self.app.ui.menuprojectviewsource.setVisible(False)
|
self.app.ui.menuprojectviewsource.setVisible(False)
|
||||||
if type(obj) != GerberObject and type(obj) != GeometryObject and type(obj) != ExcellonObject and \
|
if type(obj) != GerberObject and type(obj) != GeometryObject and type(obj) != ExcellonObject and \
|
||||||
|
|
Loading…
Reference in New Issue