mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
FIX: slice btn can't click in ubuntu
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I8566dcba151d02df56097dd5add08e45a876a9e8 (cherry picked from commit a210dbdf2ef06c9cb56cb81211515d7005795cdd)
This commit is contained in:
@@ -1622,6 +1622,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())
|
||||
@@ -1640,6 +1642,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)
|
||||
{
|
||||
@@ -1654,7 +1657,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) {
|
||||
if (m_slice_select == eSliceAll)
|
||||
|
||||
Reference in New Issue
Block a user