ENH: optimize the sequent-print behavior

1. don't sort automatically
2. enable the dragging on the object list to adjust the arrange order
3. adjust the object list order after auto-arrange
4. turn off label by default
5. add the snapshot key for label
6. check the the validation of the order

Change-Id: I91461c475cda5335b01a9a608143aa1df31741ab
This commit is contained in:
lane.wei 2022-11-30 21:43:41 +08:00 committed by Lane.Wei
parent 819e1192b7
commit c3a6b207b5
8 changed files with 115 additions and 36 deletions

View file

@ -810,13 +810,8 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
}
// force re-render while the windows gets to its final size (it takes several frames)
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
if (ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
imgui.set_requires_extra_frame();
#else
if (ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
m_canvas.request_extra_frame();
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
imgui.end();
ImGui::PopStyleColor();
@ -3027,8 +3022,8 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
case 'C':
case 'c': { m_gcode_viewer.toggle_gcode_window_visibility(); m_dirty = true; request_extra_frame(); break; }
#endif
//case 'E':
//case 'e': { m_labels.show(!m_labels.is_shown()); m_dirty = true; break; }
case 'E':
case 'e': { m_labels.show(!m_labels.is_shown()); m_dirty = true; break; }
//case 'G':
//case 'g': {
// if ((evt.GetModifiers() & shiftMask) != 0) {