NEW:Enhanced disk name function

Right click to modify the disk name, which is also displayed in the left UI bar
# Conflicts:
#	src/slic3r/GUI/GUI_Factories.cpp
#	src/slic3r/GUI/GUI_Factories.hpp

Change-Id: Ib688bef58d75fba1e5df4f201bfdcef7a3872308
(cherry picked from commit 019681ce69e115e8e4602a93dcb3dc61f20ecba5)
This commit is contained in:
zhou.xu 2023-05-06 14:22:28 +08:00 committed by Lane.Wei
parent edba4d18a6
commit fdd7d11b14
10 changed files with 112 additions and 13 deletions

View file

@ -1258,7 +1258,7 @@ void ObjectList::show_context_menu(const bool evt_context_menu)
const auto item = GetSelection();
if (item)
{
const ItemType type = m_objects_model->GetItemType(item);
const ItemType type = m_objects_model->GetItemType(item);
if (!(type & (itPlate | itObject | itVolume | itInstance)))
return;
@ -1266,6 +1266,14 @@ void ObjectList::show_context_menu(const bool evt_context_menu)
type & itInstance ? plater->instance_menu() :
type & itVolume ? plater->part_menu() :
printer_technology() == ptFFF ? plater->object_menu() : plater->sla_object_menu();
plater->SetPlateIndexByRightMenuInLeftUI(-1);
if (type & itPlate) {
int plate_idx = -1;
const ItemType type0 = m_objects_model->GetItemType(item, plate_idx);
if (plate_idx >= 0) {
plater->SetPlateIndexByRightMenuInLeftUI(plate_idx);
}
}
}
else if (evt_context_menu)
menu = plater->default_menu();