mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-24 07:33:14 +08:00
FIX:Right click is invalid on blank space in the assembly view
Jira:STUDIO-5950 modify the menu content of the left UI list Change-Id: I9784386d8d221a88bf165953b2fc593dc21e3cf4
This commit is contained in:
parent
e48abc7f30
commit
91f5bc4b52
@ -2113,6 +2113,7 @@ void GLCanvas3D::set_selected_visible(bool visible)
|
|||||||
volume->render_color[3] = volume->color[3];
|
volume->render_color[3] = volume->color[3];
|
||||||
volume->force_native_color = !visible;
|
volume->force_native_color = !visible;
|
||||||
}
|
}
|
||||||
|
m_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::delete_selected()
|
void GLCanvas3D::delete_selected()
|
||||||
|
@ -1322,17 +1322,28 @@ void ObjectList::show_context_menu(const bool evt_context_menu)
|
|||||||
const ItemType type = m_objects_model->GetItemType(item);
|
const ItemType type = m_objects_model->GetItemType(item);
|
||||||
if (!(type & (itPlate | itObject | itVolume | itInstance)))
|
if (!(type & (itPlate | itObject | itVolume | itInstance)))
|
||||||
return;
|
return;
|
||||||
|
if (wxGetApp().plater()->get_current_canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) {
|
||||||
menu = type & itPlate ? plater->plate_menu() :
|
if (type & itPlate) { return; }
|
||||||
type & itInstance ? plater->instance_menu() :
|
if (type & itVolume){
|
||||||
type & itVolume ? plater->part_menu() :
|
ModelVolumeType volume_type = m_objects_model->GetVolumeType(item);
|
||||||
printer_technology() == ptFFF ? plater->object_menu() : plater->sla_object_menu();
|
if (volume_type != ModelVolumeType::MODEL_PART)
|
||||||
plater->SetPlateIndexByRightMenuInLeftUI(-1);
|
return;
|
||||||
if (type & itPlate) {
|
}
|
||||||
int plate_idx = -1;
|
menu = plater->assemble_multi_selection_menu();
|
||||||
const ItemType type0 = m_objects_model->GetItemType(item, plate_idx);
|
}
|
||||||
if (plate_idx >= 0) {
|
else {
|
||||||
plater->SetPlateIndexByRightMenuInLeftUI(plate_idx);
|
menu = type & itPlate ? plater->plate_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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7020,7 +7020,9 @@ void Plater::priv::on_right_click(RBtnEvent& evt)
|
|||||||
if (evt.data.second) { // right button was clicked on empty space
|
if (evt.data.second) { // right button was clicked on empty space
|
||||||
if (!get_selection().is_empty()) // several objects are selected in 3DScene
|
if (!get_selection().is_empty()) // several objects are selected in 3DScene
|
||||||
return;
|
return;
|
||||||
menu = menus.default_menu();
|
if (current_panel != assemble_view) {
|
||||||
|
menu = menus.default_menu();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (current_panel == assemble_view) {
|
if (current_panel == assemble_view) {
|
||||||
@ -13511,6 +13513,7 @@ wxMenu* Plater::default_menu() { return p->menus.default_menu();
|
|||||||
wxMenu* Plater::instance_menu() { return p->menus.instance_menu(); }
|
wxMenu* Plater::instance_menu() { return p->menus.instance_menu(); }
|
||||||
wxMenu* Plater::layer_menu() { return p->menus.layer_menu(); }
|
wxMenu* Plater::layer_menu() { return p->menus.layer_menu(); }
|
||||||
wxMenu* Plater::multi_selection_menu() { return p->menus.multi_selection_menu(); }
|
wxMenu* Plater::multi_selection_menu() { return p->menus.multi_selection_menu(); }
|
||||||
|
wxMenu *Plater::assemble_multi_selection_menu() { return p->menus.assemble_multi_selection_menu(); }
|
||||||
int Plater::GetPlateIndexByRightMenuInLeftUI() { return p->m_is_RightClickInLeftUI; }
|
int Plater::GetPlateIndexByRightMenuInLeftUI() { return p->m_is_RightClickInLeftUI; }
|
||||||
void Plater::SetPlateIndexByRightMenuInLeftUI(int index) { p->m_is_RightClickInLeftUI = index; }
|
void Plater::SetPlateIndexByRightMenuInLeftUI(int index) { p->m_is_RightClickInLeftUI = index; }
|
||||||
SuppressBackgroundProcessingUpdate::SuppressBackgroundProcessingUpdate() :
|
SuppressBackgroundProcessingUpdate::SuppressBackgroundProcessingUpdate() :
|
||||||
|
@ -711,6 +711,7 @@ public:
|
|||||||
wxMenu* instance_menu();
|
wxMenu* instance_menu();
|
||||||
wxMenu* layer_menu();
|
wxMenu* layer_menu();
|
||||||
wxMenu* multi_selection_menu();
|
wxMenu* multi_selection_menu();
|
||||||
|
wxMenu* assemble_multi_selection_menu();
|
||||||
int GetPlateIndexByRightMenuInLeftUI();
|
int GetPlateIndexByRightMenuInLeftUI();
|
||||||
void SetPlateIndexByRightMenuInLeftUI(int);
|
void SetPlateIndexByRightMenuInLeftUI(int);
|
||||||
static bool has_illegal_filename_characters(const wxString& name);
|
static bool has_illegal_filename_characters(const wxString& name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user