mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-11 20:17:37 +00:00
Fix OpenGL framebuffer object support on macOS (#14769)
* Fix OpenGL framebuffer object support on macOS this enables the outline on macOS * Revert "Fix OpenGL framebuffer object support on macOS" This reverts commit 9872708954e785a86209613bbab7cc770d636b7a. * Enable ARB framebuffer if OpenGL >= 3.0 (OrcaSlicer/OrcaSlicer#14770) * FIX: plater toolbar image update jira: STUDIO-12457 Change-Id: Ia855b4bd9bec884d52202f5d8f5cfad9efce0f2f (cherry picked from commit 474691813b497654ef701fe7073992db366e81a9) * FIX: thumbinal regen jira: STUDIO-16732 Change-Id: I4cc4e76b36caf1a41793c1f84ee5e88a44ebdd42 (cherry picked from commit 53f33b7db260005e477842d6459b1b28aa8aa0d8) * FIX: force update thumbinal once dirty jira: STUDIO-13041 Change-Id: I770743b53c51351cb3b8a7133140974c75c05364 (cherry picked from commit 96198a12712f21d2b4521b6e3d1caff50bed21ff) * FIX:thumbnail update jira: STUDIO-13041 / STUDIO-13304 Change-Id: I9dec25f12454fc8485195cf5dc3feb421b6347c4 (cherry picked from commit cf778dc90f805d3f46e28f8f1d1d5814d3fb4d51) --------- Co-authored-by: jun.zhang <jun.zhang@bambulab.com>
This commit is contained in:
@@ -2338,11 +2338,6 @@ void GLCanvas3D::remove_curr_plate_all()
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
void GLCanvas3D::update_plate_thumbnails()
|
||||
{
|
||||
_update_imgui_select_plate_toolbar();
|
||||
}
|
||||
|
||||
void GLCanvas3D::select_all()
|
||||
{
|
||||
if (!m_gizmos.is_allow_select_all()) {
|
||||
@@ -3223,7 +3218,6 @@ void GLCanvas3D::on_idle(wxIdleEvent& evt)
|
||||
// BBS
|
||||
//m_dirty |= wxGetApp().plater()->get_view_toolbar().update_items_state();
|
||||
m_dirty |= wxGetApp().plater()->get_collapse_toolbar().update_items_state();
|
||||
_update_imgui_select_plate_toolbar();
|
||||
bool mouse3d_controller_applied = wxGetApp().plater()->get_mouse3d_controller().apply(wxGetApp().plater()->get_camera());
|
||||
m_dirty |= mouse3d_controller_applied;
|
||||
m_dirty |= wxGetApp().plater()->get_notification_manager()->update_notifications(*this);
|
||||
@@ -4833,11 +4827,6 @@ void GLCanvas3D::force_set_focus() {
|
||||
void GLCanvas3D::on_set_focus(wxFocusEvent& evt)
|
||||
{
|
||||
m_tooltip_enabled = false;
|
||||
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
||||
// update thumbnails and update plate toolbar
|
||||
wxGetApp().plater()->update_all_plate_thumbnails();
|
||||
_update_imgui_select_plate_toolbar();
|
||||
}
|
||||
_refresh_if_shown_on_screen();
|
||||
m_tooltip_enabled = true;
|
||||
m_is_touchpad_navigation = wxGetApp().app_config->get_bool("camera_navigation_style");
|
||||
@@ -6920,13 +6909,28 @@ void GLCanvas3D::_update_select_plate_toolbar_stats_item(bool force_selected) {
|
||||
bool GLCanvas3D::_update_imgui_select_plate_toolbar()
|
||||
{
|
||||
bool result = true;
|
||||
if (!m_sel_plate_toolbar.is_enabled() || m_sel_plate_toolbar.is_render_finish) return false;
|
||||
if (!m_sel_plate_toolbar.is_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& p_plater = wxGetApp().plater();
|
||||
if (!p_plater) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!p_plater->is_plate_toolbar_image_dirty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!p_plater->is_gcode_3mf()) {
|
||||
p_plater->update_all_plate_thumbnails(true);
|
||||
}
|
||||
|
||||
_update_select_plate_toolbar_stats_item();
|
||||
|
||||
m_sel_plate_toolbar.del_all_item();
|
||||
|
||||
PartPlateList& plate_list = wxGetApp().plater()->get_partplate_list();
|
||||
PartPlateList& plate_list = p_plater->get_partplate_list();
|
||||
for (int i = 0; i < plate_list.get_plate_count(); i++) {
|
||||
IMToolbarItem* item = new IMToolbarItem();
|
||||
PartPlate* plate = plate_list.get_plate(i);
|
||||
@@ -6939,7 +6943,7 @@ bool GLCanvas3D::_update_imgui_select_plate_toolbar()
|
||||
}
|
||||
m_sel_plate_toolbar.m_items.push_back(item);
|
||||
}
|
||||
|
||||
p_plater->clear_plate_toolbar_image_dirty();
|
||||
m_sel_plate_toolbar.is_display_scrollbar = false;
|
||||
return result;
|
||||
}
|
||||
@@ -8797,6 +8801,8 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
|
||||
return;
|
||||
}
|
||||
|
||||
_update_imgui_select_plate_toolbar();
|
||||
|
||||
IMToolbarItem* all_plates_stats_item = m_sel_plate_toolbar.m_all_plates_stats_item;
|
||||
|
||||
PartPlateList& plate_list = wxGetApp().plater()->get_partplate_list();
|
||||
@@ -9213,7 +9219,6 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
|
||||
m_sel_plate_toolbar.is_display_scrollbar = is_win_hovered;
|
||||
|
||||
imgui.end();
|
||||
m_sel_plate_toolbar.is_render_finish = true;
|
||||
}
|
||||
|
||||
//BBS: GUI refactor: GLToolbar adjust
|
||||
|
||||
Reference in New Issue
Block a user