- Geometry Editor: added some constraints in regards of the required selection before using some of the subTools
This commit is contained in:
@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM Evo beta
|
|||||||
|
|
||||||
- Geometry Editor: subtool Path: fixed issue of not registering the new click when using the Shift modifier
|
- Geometry Editor: subtool Path: fixed issue of not registering the new click when using the Shift modifier
|
||||||
- Geometry Editor: subtool Path: the coordinates displayed when using the Shift key modifier are the coordinates for the end of the line and not the mouse cursor
|
- Geometry Editor: subtool Path: the coordinates displayed when using the Shift key modifier are the coordinates for the end of the line and not the mouse cursor
|
||||||
|
- Geometry Editor: added some constraints in regards of the required selection before using some of the subTools
|
||||||
|
|
||||||
24.05.2023
|
24.05.2023
|
||||||
|
|
||||||
|
|||||||
@@ -5103,12 +5103,20 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
|
|
||||||
def work_task(editor_self):
|
def work_task(editor_self):
|
||||||
with editor_self.app.proc_container.new(_("Working...")):
|
with editor_self.app.proc_container.new(_("Working...")):
|
||||||
results = unary_union([t.geo for t in editor_self.get_selected()])
|
selected = editor_self.get_selected()
|
||||||
|
|
||||||
|
if len(selected) < 2:
|
||||||
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
|
_("A selection of minimum two items is required."))
|
||||||
|
editor_self.select_tool('select')
|
||||||
|
return
|
||||||
|
|
||||||
|
results = unary_union([t.geo for t in selected])
|
||||||
if results.geom_type == 'MultiLineString':
|
if results.geom_type == 'MultiLineString':
|
||||||
results = linemerge(results)
|
results = linemerge(results)
|
||||||
|
|
||||||
# Delete originals.
|
# Delete originals.
|
||||||
for_deletion = [s for s in editor_self.get_selected()]
|
for_deletion = [s for s in selected]
|
||||||
for shape in for_deletion:
|
for shape in for_deletion:
|
||||||
editor_self.delete_shape(shape)
|
editor_self.delete_shape(shape)
|
||||||
|
|
||||||
@@ -5137,7 +5145,7 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
|
|
||||||
if len(selected) < 2:
|
if len(selected) < 2:
|
||||||
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
_("A selection of minimum two items is required to do Intersection."))
|
_("A selection of minimum two items is required."))
|
||||||
editor_self.select_tool('select')
|
editor_self.select_tool('select')
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -5192,7 +5200,7 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
|
|
||||||
if len(selected) < 2:
|
if len(selected) < 2:
|
||||||
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
_("A selection of minimum two items is required to do Intersection."))
|
_("A selection of minimum two items is required."))
|
||||||
editor_self.select_tool('select')
|
editor_self.select_tool('select')
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -5242,6 +5250,12 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
def work_task(editor_self):
|
def work_task(editor_self):
|
||||||
with editor_self.app.proc_container.new(_("Working...")):
|
with editor_self.app.proc_container.new(_("Working...")):
|
||||||
selected = editor_self.get_selected()
|
selected = editor_self.get_selected()
|
||||||
|
if len(selected) < 2:
|
||||||
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
|
_("A selection of minimum two items is required."))
|
||||||
|
editor_self.select_tool('select')
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
target = deepcopy(selected[0].geo)
|
target = deepcopy(selected[0].geo)
|
||||||
tools = selected[1:]
|
tools = selected[1:]
|
||||||
@@ -5270,6 +5284,12 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
def work_task(editor_self):
|
def work_task(editor_self):
|
||||||
with editor_self.app.proc_container.new(_("Working...")):
|
with editor_self.app.proc_container.new(_("Working...")):
|
||||||
selected = editor_self.get_selected()
|
selected = editor_self.get_selected()
|
||||||
|
if len(selected) < 2:
|
||||||
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
|
_("A selection of minimum two items is required."))
|
||||||
|
editor_self.select_tool('select')
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
target = deepcopy(selected[0].geo)
|
target = deepcopy(selected[0].geo)
|
||||||
tools = selected[1:]
|
tools = selected[1:]
|
||||||
@@ -5295,6 +5315,12 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
def work_task(editor_self):
|
def work_task(editor_self):
|
||||||
with editor_self.app.proc_container.new(_("Working...")):
|
with editor_self.app.proc_container.new(_("Working...")):
|
||||||
selected = editor_self.get_selected()
|
selected = editor_self.get_selected()
|
||||||
|
if len(selected) < 2:
|
||||||
|
editor_self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||||
|
_("A selection of minimum two items is required."))
|
||||||
|
editor_self.select_tool('select')
|
||||||
|
return
|
||||||
|
|
||||||
tools = selected[1:]
|
tools = selected[1:]
|
||||||
toolgeo = unary_union([shp.geo for shp in tools])
|
toolgeo = unary_union([shp.geo for shp in tools])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user