From a210dbdf2ef06c9cb56cb81211515d7005795cdd Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Sat, 29 Mar 2025 15:07:18 +0800 Subject: [PATCH] FIX: slice btn can't click in ubuntu jira: NONE Signed-off-by: xun.zhang Change-Id: I8566dcba151d02df56097dd5add08e45a876a9e8 --- src/slic3r/GUI/MainFrame.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 63447b7dd..82a5ed217 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -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");