NEW:add tab key to change 3D to preview

jira:none
code is from OrcaSlicer,thanks for OrcaSlicer and SoftFever
commit 2a478ab4f9bdc1bc1fbc9dfadbb717df6e5a38a9
Author: SoftFever <softfeverever@gmail.com>
Date:   Sat Aug 26 18:24:13 2023 +0800

    post changes after merging BS1.7.4

Change-Id: Iec176023f6f8e4b93a3756a78e31f85b249d1dfa
This commit is contained in:
SoftFever 2024-05-20 10:26:13 +08:00 committed by Lane.Wei
parent a4ba939452
commit 98dc111d71
2 changed files with 5 additions and 5 deletions

View File

@ -3493,7 +3493,7 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
else if (m_tab_down && keyCode == WXK_TAB && !evt.HasAnyModifiers()) {
// Enable switching between 3D and Preview with Tab
// m_canvas->HandleAsNavigationKey(evt); // XXX: Doesn't work in some cases / on Linux
//post_event(SimpleEvent(EVT_GLCANVAS_TAB));
post_event(SimpleEvent(EVT_GLCANVAS_TAB));
}
else if (keyCode == WXK_SHIFT) {
translationProcessor.process(evt);

View File

@ -3340,11 +3340,11 @@ void Plater::priv::select_view_3D(const std::string& name, bool no_slice)
void Plater::priv::select_next_view_3D()
{
if (current_panel == view3D)
set_current_panel(preview);
wxGetApp().mainframe->select_tab(size_t(MainFrame::tpPreview));
else if (current_panel == preview)
set_current_panel(assemble_view);
else if (current_panel == assemble_view)
set_current_panel(view3D);
wxGetApp().mainframe->select_tab(size_t(MainFrame::tp3DEditor));
//else if (current_panel == assemble_view)
// set_current_panel(view3D);
}
void Plater::priv::collapse_sidebar(bool collapse)