mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Fixed a crash on copy/paste, when ObjectList has no selection. Related to #5517
This commit is contained in:
@@ -1070,6 +1070,8 @@ bool ObjectList::copy_to_clipboard()
|
|||||||
{
|
{
|
||||||
wxDataViewItemArray sels;
|
wxDataViewItemArray sels;
|
||||||
GetSelections(sels);
|
GetSelections(sels);
|
||||||
|
if (sels.IsEmpty())
|
||||||
|
return false;
|
||||||
ItemType type = m_objects_model->GetItemType(sels.front());
|
ItemType type = m_objects_model->GetItemType(sels.front());
|
||||||
if (!(type & (itSettings | itLayer | itLayerRoot))) {
|
if (!(type & (itSettings | itLayer | itLayerRoot))) {
|
||||||
m_clipboard.reset();
|
m_clipboard.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user