FIX: slice btn can't click in ubuntu
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I8566dcba151d02df56097dd5add08e45a876a9e8
This commit is contained in:
parent
55f79b2737
commit
a210dbdf2e
|
@ -1635,6 +1635,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_filament_group_popup->tryPopup(m_plater, curr_plate, m_slice_select == eSliceAll);
|
||||
};
|
||||
|
||||
#ifndef __linux__
|
||||
// in linux plateform, the pop up will taker over the mouse event and make the slice button cannot handle click event
|
||||
// this pannel is used to trigger hover when button is disabled
|
||||
slice_panel->Bind(wxEVT_ENTER_WINDOW, [this,try_hover_pop_up](auto& event) {
|
||||
if(!m_slice_option_pop_up || !m_slice_option_pop_up->IsShown())
|
||||
|
@ -1653,6 +1655,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_slice_btn->Bind(wxEVT_LEAVE_WINDOW, [this](auto& event) {
|
||||
m_filament_group_popup->tryClose();
|
||||
});
|
||||
#endif
|
||||
|
||||
m_slice_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
|
||||
{
|
||||
|
@ -1667,7 +1670,11 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
bool slice = true;
|
||||
|
||||
auto curr_plate = m_plater->get_partplate_list().get_curr_plate();
|
||||
slice = try_pop_up_before_slice(m_slice_select == eSliceAll, m_plater, curr_plate);
|
||||
#ifdef __linux__
|
||||
slice = try_pop_up_before_slice(m_slice_select == eSliceAll, m_plater, curr_plate, true);
|
||||
#else
|
||||
slice = try_pop_up_before_slice(m_slice_select == eSliceAll, m_plater, curr_plate, false);
|
||||
#endif
|
||||
|
||||
if (slice) {
|
||||
std::string printer_model = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_string("printer_model");
|
||||
|
|
Loading…
Reference in New Issue