mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-18 13:10:54 +00:00
merge main
This commit is contained in:
1 parent
ccbb73baaf
commit
ecbd03fed7
868 files changed
+203633
-35823
No files matched your search
+65
-130
@@ -191,6 +191,7 @@
|
||||
#ifdef __WXGTK__
|
||||
#include "LinuxDisplayBackend.hpp"
|
||||
#endif
|
||||
#include "AuiMgr.hpp"
|
||||
#include "AuiPaneLayout.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "GUI_Factories.hpp"
|
||||
@@ -935,7 +936,7 @@ struct Sidebar::priv
|
||||
// that Orca's sidebar has no counterpart for, so these are parented to p->scrolled.
|
||||
wxPanel* m_btn_add_mixed_filament{nullptr}; // "+ Add Mixed Filament" full-width button
|
||||
wxPanel* m_panel_mixed_title{nullptr}; // title row: "Mixed Filament" + add/del buttons
|
||||
wxStaticText* m_text_mixed_title{nullptr};
|
||||
StaticLine* m_text_mixed_title{nullptr};
|
||||
ScalableButton* m_btn_mixed_add{nullptr};
|
||||
ScalableButton* m_btn_mixed_del{nullptr};
|
||||
wxScrolledWindow* m_mixed_scroll_area{nullptr}; // independent scrollbar for mixed rows
|
||||
@@ -2999,6 +3000,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
});
|
||||
|
||||
// "Variant", not "Nozzle": picking one switches the printer preset (see panel_nozzle_dia).
|
||||
// TRN Sidebar label of the printer variant (nozzle) selector; picking one switches the printer preset.
|
||||
p->label_nozzle_title = new Label(p->panel_nozzle_dia, _L("Variant"), LB_PROPAGATE_MOUSE_EVENT);
|
||||
p->label_nozzle_title->SetFont(Label::Body_10);
|
||||
|
||||
@@ -3031,7 +3033,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
p->combo_nozzle_dia->Bind(wxEVT_SET_FOCUS, [nozzle_focus_bg](auto& e) {nozzle_focus_bg(true ); e.Skip();});
|
||||
p->combo_nozzle_dia->Bind(wxEVT_KILL_FOCUS, [nozzle_focus_bg](auto& e) {nozzle_focus_bg(false); e.Skip();});
|
||||
|
||||
p->label_nozzle_type = new Label(p->panel_nozzle_dia, "Brass", LB_PROPAGATE_MOUSE_EVENT | wxST_ELLIPSIZE_END | wxALIGN_CENTRE_HORIZONTAL);
|
||||
p->label_nozzle_type = new Label(p->panel_nozzle_dia, _L("Brass"), LB_PROPAGATE_MOUSE_EVENT | wxST_ELLIPSIZE_END | wxALIGN_CENTRE_HORIZONTAL);
|
||||
p->label_nozzle_type->SetFont(Label::Body_10);
|
||||
p->label_nozzle_type->SetMinSize(FromDIP(wxSize(56, -1)));
|
||||
p->label_nozzle_type->SetMaxSize(FromDIP(wxSize(56, -1)));
|
||||
@@ -3435,10 +3437,10 @@ Sidebar::Sidebar(Plater *parent)
|
||||
p->m_panel_mixed_title->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
|
||||
{
|
||||
auto* title_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
p->m_text_mixed_title = new wxStaticText(p->m_panel_mixed_title, wxID_ANY, _L("Mixed Filament"));
|
||||
p->m_text_mixed_title = new StaticLine(p->m_panel_mixed_title, false, _L("Mixed Filament"));
|
||||
p->m_text_mixed_title->SetFont(::Label::Head_14);
|
||||
title_sizer->Add(p->m_text_mixed_title, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::TitlebarMargin()));
|
||||
title_sizer->AddStretchSpacer();
|
||||
p->m_text_mixed_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
|
||||
title_sizer->Add(p->m_text_mixed_title, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::TitlebarMargin()));
|
||||
|
||||
p->m_btn_mixed_del = new ScalableButton(p->m_panel_mixed_title, wxID_ANY, "delete_filament");
|
||||
p->m_btn_mixed_del->SetToolTip(_L("Remove last mixed filament"));
|
||||
@@ -3578,6 +3580,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
search_sizer->Fit(p->m_search_bar);
|
||||
|
||||
p->m_object_list = new ObjectList(p->scrolled);
|
||||
p->m_object_list->SetBackgroundColour(*wxWHITE);
|
||||
p->m_object_list->Bind(wxCUSTOMEVT_EXIT_SEARCH, [this](wxCommandEvent&) {
|
||||
#ifdef __WXGTK__
|
||||
this->p->m_search_item->Enable(true);
|
||||
@@ -4305,7 +4308,7 @@ void Sidebar::update_mixed_filament_list()
|
||||
wxWindowUpdateLocker noUpdates(this);
|
||||
|
||||
const wxColour mc_bg = StateColor::darkModeColorFor(*wxWHITE);
|
||||
const wxColour mc_border = StateColor::darkModeColorFor(wxColour("#CECECE"));
|
||||
const wxColour mc_border = StateColor::darkModeColorFor(wxColour("#DBDBDB")); // same color with filament combo box border
|
||||
const wxColour mc_text = StateColor::darkModeColorFor(wxColour("#262E30"));
|
||||
const wxColour mc_dim = StateColor::darkModeColorFor(wxColour("#ACACAC"));
|
||||
|
||||
@@ -4419,8 +4422,9 @@ void Sidebar::update_mixed_filament_list()
|
||||
for (size_t i = 0; i < mixed_indices.size(); ++i) {
|
||||
size_t cfg_idx = mixed_indices[i];
|
||||
auto* combo_and_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
combo_and_btn_sizer->Add(FromDIP(10), 0, 0, 0, 0);
|
||||
|
||||
if (i == 0 || i % 2 == 0) // dont add left margin for right column items so all horizontal margins will be equal like on filaments section
|
||||
combo_and_btn_sizer->AddSpacer(FromDIP(SidebarProps::ContentMargin()));
|
||||
|
||||
// Parse components and ratios from config strings (supports 2-N components)
|
||||
std::vector<unsigned int> comp_ids;
|
||||
@@ -4510,10 +4514,12 @@ void Sidebar::update_mixed_filament_list()
|
||||
dc.DrawText(txt, (sz.GetWidth() - txt_sz.GetWidth()) / 2,
|
||||
(sz.GetHeight() - txt_sz.GetHeight()) / 2);
|
||||
});
|
||||
combo_and_btn_sizer->Add(grad_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(4));
|
||||
grad_panel->Bind(wxEVT_LEFT_UP, [this, i](wxMouseEvent&) { edit_mixed_filament(i); }); // ORCA also open edit color dialog with clicking swatch
|
||||
combo_and_btn_sizer->Add(grad_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
|
||||
} else {
|
||||
combo_and_btn_sizer->Add(make_swatch_panel(p->m_panel_mixed_content, mix_col, mix_num),
|
||||
0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(4));
|
||||
auto swatch_panel = make_swatch_panel(p->m_panel_mixed_content, mix_col, mix_num);
|
||||
swatch_panel->Bind(wxEVT_LEFT_UP, [this, i](wxMouseEvent&) { edit_mixed_filament(i); }); // ORCA also open edit color dialog with clicking swatch
|
||||
combo_and_btn_sizer->Add(swatch_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
|
||||
}
|
||||
|
||||
auto* content_panel = new wxPanel(p->m_panel_mixed_content, wxID_ANY);
|
||||
@@ -4737,9 +4743,9 @@ void Sidebar::update_mixed_filament_list()
|
||||
|
||||
PopupMenu(&menu);
|
||||
});
|
||||
combo_and_btn_sizer->Add(menu_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(4));
|
||||
combo_and_btn_sizer->Add(menu_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
|
||||
|
||||
combo_and_btn_sizer->Add(FromDIP(16), 0, 0, 0, 0);
|
||||
combo_and_btn_sizer->Add(FromDIP(SidebarProps::ContentMargin()), 0, 0, 0, 0);
|
||||
|
||||
int side = i % 2;
|
||||
auto* col = (side == 0) ? left_col : right_col;
|
||||
@@ -7108,28 +7114,6 @@ enum ExportingStatus{
|
||||
EXPORTING_TO_LOCAL
|
||||
};
|
||||
|
||||
|
||||
// TODO: listen on dark ui change
|
||||
class FloatFrame : public wxAuiFloatingFrame
|
||||
{
|
||||
public:
|
||||
FloatFrame(wxWindow* parent, wxAuiManager* ownerMgr, const wxAuiPaneInfo& pane) : wxAuiFloatingFrame(parent, ownerMgr, pane)
|
||||
{
|
||||
wxGetApp().UpdateFrameDarkUI(this);
|
||||
}
|
||||
};
|
||||
|
||||
class AuiMgr : public wxAuiManager
|
||||
{
|
||||
public:
|
||||
AuiMgr() : wxAuiManager(){}
|
||||
|
||||
virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p) override
|
||||
{
|
||||
return new FloatFrame(parent, this, p);
|
||||
}
|
||||
};
|
||||
|
||||
// Plater / private
|
||||
struct Plater::priv
|
||||
{
|
||||
@@ -7610,7 +7594,6 @@ struct Plater::priv
|
||||
//BBS: change dark/light mode
|
||||
void on_change_color_mode(SimpleEvent& evt);
|
||||
void on_apple_change_color_mode(wxSysColourChangedEvent& evt);
|
||||
void apply_color_mode();
|
||||
void on_update_geometry(Vec3dsEvent<2>&);
|
||||
void on_3dcanvas_mouse_dragging_started(SimpleEvent&);
|
||||
void on_3dcanvas_mouse_dragging_finished(SimpleEvent&);
|
||||
@@ -7821,20 +7804,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
{
|
||||
m_is_dark = wxGetApp().app_config->get("dark_color_mode") == "1";
|
||||
|
||||
#ifdef __WXGTK__
|
||||
const bool disable_wayland_floating = Slic3r::GUI::is_running_on_wayland();
|
||||
#endif
|
||||
|
||||
m_aui_mgr.SetManagedWindow(q);
|
||||
m_aui_mgr.SetDockSizeConstraint(1, 1);
|
||||
#ifdef __WXGTK__
|
||||
if (disable_wayland_floating)
|
||||
m_aui_mgr.SetFlags(m_aui_mgr.GetFlags() & ~wxAUI_MGR_ALLOW_FLOATING);
|
||||
#endif
|
||||
//m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE, 0);
|
||||
//m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_SASH_SIZE, 2);
|
||||
m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_CAPTION_SIZE, 18);
|
||||
m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
|
||||
m_aui_mgr.init(q);
|
||||
|
||||
this->q->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
|
||||
@@ -7916,13 +7886,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
update();
|
||||
|
||||
// Orca: Make sidebar dockable
|
||||
m_aui_mgr.AddPane(sidebar, wxAuiPaneInfo()
|
||||
.Name("sidebar")
|
||||
.Left()
|
||||
.CloseButton(false)
|
||||
.TopDockable(false)
|
||||
.BottomDockable(false)
|
||||
.BestSize(wxSize(39 * wxGetApp().em_unit(), 90 * wxGetApp().em_unit())));
|
||||
m_aui_mgr.AddPane(sidebar, AuiMgr::sidebar_pane_info());
|
||||
|
||||
// UV editor pane for GLGizmoTextureDisplacement's LSCM unwrap preview - a resizable/dockable
|
||||
// sibling of "sidebar"/"main" like everything else registered on this same AUI manager, not a
|
||||
@@ -7974,8 +7938,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
if (!layout.empty()) {
|
||||
bool removed_floating_state = false;
|
||||
#ifdef __WXGTK__
|
||||
if (disable_wayland_floating)
|
||||
layout = sanitize_window_layout_for_wayland(layout, &removed_floating_state);
|
||||
layout = sanitize_window_layout_for_wayland(layout, &removed_floating_state);
|
||||
#endif
|
||||
|
||||
if (!m_aui_mgr.LoadPerspective(layout, false)) {
|
||||
@@ -7997,12 +7960,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
|
||||
// Keep tracking the current sidebar size, by storing it using `best_size`, which will be stored
|
||||
// in the config and re-applied when the app is opened again.
|
||||
this->sidebar->Bind(wxEVT_IDLE, [&sidebar](wxIdleEvent& e) {
|
||||
if (sidebar.IsShown() && sidebar.IsDocked() && sidebar.rect.GetWidth() > 0) {
|
||||
sidebar.BestSize(sidebar.rect.GetWidth(), sidebar.best_size.GetHeight());
|
||||
}
|
||||
e.Skip();
|
||||
});
|
||||
m_aui_mgr.track_docked_size(this->sidebar);
|
||||
|
||||
// Hide sidebar initially, will re-show it after initialization when we got proper window size
|
||||
sidebar.Hide();
|
||||
@@ -8226,8 +8184,6 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
q->SetDropTarget(new PlaterDropTarget(*main_frame, *q)); // if my understanding is right, wxWindow takes the owenership
|
||||
q->Layout();
|
||||
|
||||
apply_color_mode();
|
||||
|
||||
set_current_panel(wxGetApp().is_editor() ? static_cast<wxPanel*>(view3D) : static_cast<wxPanel*>(preview));
|
||||
|
||||
// updates camera type from .ini file
|
||||
@@ -8706,18 +8662,7 @@ void Plater::priv::add_dock_pane(wxWindow* window, const std::string& name, cons
|
||||
info.Show(dock_pane_visible(dock_pane, info));
|
||||
m_aui_mgr.AddPane(window, info);
|
||||
|
||||
// wxAUI does not record a dragged sash in best_size, so track the docked size like the sidebar
|
||||
// does, for the saved layout.
|
||||
window->Bind(wxEVT_IDLE, [this, window](wxIdleEvent& evt) {
|
||||
wxAuiPaneInfo& pane = m_aui_mgr.GetPane(window);
|
||||
if (pane.IsOk() && pane.IsShown() && pane.IsDocked() && pane.rect.GetWidth() > 0 && pane.rect.GetHeight() > 0) {
|
||||
const bool horizontal = pane.dock_direction == wxAUI_DOCK_TOP || pane.dock_direction == wxAUI_DOCK_BOTTOM;
|
||||
pane.BestSize(horizontal ? pane.best_size.GetWidth() : pane.rect.GetWidth(),
|
||||
horizontal ? pane.rect.GetHeight() : pane.best_size.GetHeight());
|
||||
}
|
||||
evt.Skip();
|
||||
});
|
||||
|
||||
m_aui_mgr.track_docked_size(window);
|
||||
m_aui_mgr.Update();
|
||||
}
|
||||
|
||||
@@ -10270,10 +10215,23 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
// a user sees after opening a design they spent an hour on — it reads as "your work is gone"
|
||||
// when the recipe has in fact just been loaded and the Design tab will rehydrate it. Count a
|
||||
// recipe that came from THESE files as geometry.
|
||||
if (tolal_model_count <= 0 && !loaded_cad_recipe && !q->m_exported_file) {
|
||||
//
|
||||
// Only where the Design tab can actually show it, though. With the CAD feature switched off
|
||||
// (or not built) the recipe is still carried through to the next save, but nothing will
|
||||
// display it, so an empty plate needs saying — and saying why.
|
||||
bool cad_can_show = false;
|
||||
#ifdef SLIC3R_CAD
|
||||
cad_can_show = wxGetApp().is_enable_cad_feature();
|
||||
#endif
|
||||
if (tolal_model_count <= 0 && !q->m_exported_file && (!loaded_cad_recipe || !cad_can_show)) {
|
||||
dlg.Hide();
|
||||
if (!is_user_cancel) {
|
||||
MessageDialog msg(wxGetApp().mainframe, _L("The file does not contain any geometry data."), _L("Warning"), wxYES | wxICON_WARNING);
|
||||
const wxString text = loaded_cad_recipe
|
||||
? _L("This project contains a model made in the Design tab and no other geometry. "
|
||||
"Enable \"CAD feature (experimental)\" in Preferences and restart to see and edit it; "
|
||||
"it is kept when the project is saved.")
|
||||
: _L("The file does not contain any geometry data.");
|
||||
MessageDialog msg(wxGetApp().mainframe, text, _L("Warning"), wxYES | wxICON_WARNING);
|
||||
if (msg.ShowModal() == wxID_YES) {}
|
||||
}
|
||||
}
|
||||
@@ -13808,7 +13766,7 @@ void Plater::priv::on_apple_change_color_mode(wxSysColourChangedEvent& evt) {
|
||||
assemble_view->get_canvas3d()->on_change_color_mode(m_is_dark);
|
||||
}
|
||||
|
||||
apply_color_mode();
|
||||
m_aui_mgr.apply_color_mode();
|
||||
}
|
||||
|
||||
void Plater::priv::on_change_color_mode(SimpleEvent& evt) {
|
||||
@@ -13819,19 +13777,7 @@ void Plater::priv::on_change_color_mode(SimpleEvent& evt) {
|
||||
assemble_view->get_canvas3d()->on_change_color_mode(m_is_dark);
|
||||
if (m_send_to_sdcard_dlg) m_send_to_sdcard_dlg->on_change_color_mode();
|
||||
|
||||
apply_color_mode();
|
||||
}
|
||||
|
||||
void Plater::priv::apply_color_mode()
|
||||
{
|
||||
const bool is_dark = wxGetApp().dark_mode();
|
||||
wxColour orca_color = wxColour(59, 68, 70);//wxColour(ColorRGBA::ORCA().r_uchar(), ColorRGBA::ORCA().g_uchar(), ColorRGBA::ORCA().b_uchar());
|
||||
orca_color = is_dark ? StateColor::darkModeColorFor(orca_color) : StateColor::lightModeColorFor(orca_color);
|
||||
wxColour sash_color = is_dark ? wxColour(38, 46, 48) : wxColour(206, 206, 206);
|
||||
m_aui_mgr.GetArtProvider()->SetColour(wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR, sash_color);
|
||||
m_aui_mgr.GetArtProvider()->SetColour(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, *wxWHITE);
|
||||
m_aui_mgr.GetArtProvider()->SetColour(wxAUI_DOCKART_SASH_COLOUR, sash_color);
|
||||
m_aui_mgr.GetArtProvider()->SetColour(wxAUI_DOCKART_BORDER_COLOUR, is_dark ? *wxBLACK : wxColour(165, 165, 165));
|
||||
m_aui_mgr.apply_color_mode();
|
||||
}
|
||||
|
||||
static void get_position(wxWindowBase* child, wxWindowBase* until_parent, int& x, int& y) {
|
||||
@@ -14487,26 +14433,9 @@ bool Plater::priv::init_collapse_toolbar()
|
||||
if (!collapse_toolbar.init(background_data))
|
||||
return false;
|
||||
|
||||
collapse_toolbar.set_layout_type(GLToolbar::Layout::Vertical);
|
||||
collapse_toolbar.set_horizontal_orientation(GLToolbar::Layout::HO_Right);
|
||||
collapse_toolbar.set_vertical_orientation(GLToolbar::Layout::VO_Top);
|
||||
collapse_toolbar.set_border(4.0f);
|
||||
collapse_toolbar.set_separator_size(4);
|
||||
collapse_toolbar.set_gap_size(2);
|
||||
|
||||
collapse_toolbar.del_all_item();
|
||||
|
||||
GLToolbarItem::Data item;
|
||||
|
||||
item.name = "collapse_sidebar";
|
||||
// set collapse svg name
|
||||
item.icon_filename = "collapse.svg";
|
||||
item.sprite_id = 0;
|
||||
item.left.action_callback = []() {
|
||||
wxGetApp().plater()->collapse_sidebar(!wxGetApp().plater()->is_sidebar_collapsed());
|
||||
};
|
||||
|
||||
if (!collapse_toolbar.add_item(item))
|
||||
if (!setup_collapse_toolbar(collapse_toolbar, []() {
|
||||
wxGetApp().plater()->collapse_sidebar(!wxGetApp().plater()->is_sidebar_collapsed());
|
||||
}))
|
||||
return false;
|
||||
|
||||
// Now "collapse" sidebar to current state. This is done so the tooltip
|
||||
@@ -16395,7 +16324,7 @@ bool Plater::add_model(bool imperial_units, std::string fname)
|
||||
|
||||
void Plater::calib_pa(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_pa_name = wxString::Format(L"Pressure Advance Test");
|
||||
const auto calib_pa_name = _L("Pressure Advance Test");
|
||||
new_project(false, false, calib_pa_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||
@@ -16872,11 +16801,9 @@ void Plater::calib_flowrate(bool is_linear, int pass, InfillPattern pattern) {
|
||||
return;
|
||||
wxString calib_name;
|
||||
if (is_linear) {
|
||||
calib_name = L"Orca YOLO Flow Calibration";
|
||||
if (pass == 2)
|
||||
calib_name += L" - Perfectionist version";
|
||||
calib_name = pass == 2 ? _L("Orca YOLO Flow Calibration - Perfectionist version") : _L("Orca YOLO Flow Calibration");
|
||||
} else
|
||||
calib_name = wxString::Format(L"Flowrate Test - Pass%d", pass);
|
||||
calib_name = wxString::Format(_L("Flowrate Test - Pass%d"), pass);
|
||||
|
||||
if (new_project(false, false, calib_name) == wxID_CANCEL)
|
||||
return;
|
||||
@@ -16916,7 +16843,7 @@ void Plater::calib_temp(const Calib_Params& params) {
|
||||
constexpr double base_temp_tower_block_height = 10.0;
|
||||
constexpr int base_temp_tower_temp_step = 5;
|
||||
|
||||
const auto calib_temp_name = wxString::Format(L"Nozzle temperature test");
|
||||
const auto calib_temp_name = _L("Nozzle temperature test");
|
||||
new_project(false, false, calib_temp_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Temp_Tower) return;
|
||||
@@ -16996,7 +16923,7 @@ void Plater::calib_temp(const Calib_Params& params) {
|
||||
|
||||
void Plater::calib_max_vol_speed(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_vol_speed_name = wxString::Format(L"Max volumetric speed test");
|
||||
const auto calib_vol_speed_name = _L("Max volumetric speed test");
|
||||
new_project(false, false, calib_vol_speed_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Vol_speed_Tower)
|
||||
@@ -17075,7 +17002,7 @@ void Plater::calib_max_vol_speed(const Calib_Params& params)
|
||||
|
||||
void Plater::calib_retraction(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_retraction_name = wxString::Format(L"Retraction");
|
||||
const auto calib_retraction_name = _L("Retraction");
|
||||
new_project(false, false, calib_retraction_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Retraction_tower)
|
||||
@@ -17137,7 +17064,7 @@ void Plater::calib_retraction(const Calib_Params& params)
|
||||
|
||||
void Plater::calib_VFA(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_vfa_name = wxString::Format(L"VFA test");
|
||||
const auto calib_vfa_name = _L("VFA test");
|
||||
new_project(false, false, calib_vfa_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_VFA_Tower)
|
||||
@@ -17220,7 +17147,7 @@ void Plater::calib_VFA(const Calib_Params& params)
|
||||
|
||||
void Plater::calib_input_shaping_freq(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_input_shaping_name = wxString::Format(L"Input shaping Frequency test");
|
||||
const auto calib_input_shaping_name = _L("Input shaping Frequency test");
|
||||
new_project(false, false, calib_input_shaping_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Input_shaping_freq)
|
||||
@@ -17282,7 +17209,7 @@ void Plater::calib_input_shaping_freq(const Calib_Params& params)
|
||||
|
||||
void Plater::calib_input_shaping_damp(const Calib_Params& params)
|
||||
{
|
||||
const auto calib_input_shaping_name = wxString::Format(L"Input shaping Damping test");
|
||||
const auto calib_input_shaping_name = _L("Input shaping Damping test");
|
||||
new_project(false, false, calib_input_shaping_name);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Input_shaping_damp)
|
||||
@@ -17343,7 +17270,7 @@ void Plater::calib_input_shaping_damp(const Calib_Params& params)
|
||||
|
||||
void Plater::Calib_Cornering(const Calib_Params& params)
|
||||
{
|
||||
const auto Calib_Cornering = wxString::Format(L"Cornering test");
|
||||
const auto Calib_Cornering = _L("Cornering test");
|
||||
new_project(false, false, Calib_Cornering);
|
||||
wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
|
||||
if (params.mode != CalibMode::Calib_Cornering)
|
||||
@@ -17531,7 +17458,7 @@ void Plater::load_gcode(const wxString& filename)
|
||||
if (p->preview->get_canvas3d()->get_gcode_layers_zs().empty()) {
|
||||
MessageDialog(this, _L("The selected file") + ":\n" + filename + "\n" + _L("Does not contain valid G-code."),
|
||||
wxString(GCODEVIEWER_APP_NAME) + " - " + _L("An Error has occurred while loading the G-code file."), wxCLOSE | wxICON_WARNING | wxCENTRE).ShowModal();
|
||||
set_project_filename(DEFAULT_PROJECT_NAME);
|
||||
set_project_filename(_L(DEFAULT_PROJECT_NAME));
|
||||
} else {
|
||||
set_project_filename(filename);
|
||||
}
|
||||
@@ -17882,7 +17809,7 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename)
|
||||
// Orca: hide the "Don't show again" checkbox, people keeps accidentally checked this then forgot
|
||||
// wxBoxSizer *m_sizer_left = new wxBoxSizer(wxHORIZONTAL);
|
||||
//
|
||||
// auto dont_show_again = create_remember_checkbox(_L("Remember my choice."), this, _L("This option can be changed later in preferences, under 'Load Behaviour'."));
|
||||
// auto dont_show_again = create_remember_checkbox(_L("Remember my choice."), this, _L("This option can be changed later in preferences, under 'Load Behavior'."));
|
||||
// m_sizer_left->Add(dont_show_again, 0, wxALL, 5);
|
||||
//
|
||||
// m_sizer_bottom->Add(m_sizer_left, 0, wxEXPAND, 5);
|
||||
@@ -18351,7 +18278,15 @@ bool Plater::is_sidebar_collapsed() const { return p->sidebar_layout.is_collapse
|
||||
void Plater::collapse_sidebar(bool collapse) { p->collapse_sidebar(collapse); }
|
||||
Sidebar::DockingState Plater::get_sidebar_docking_state() const { return p->get_sidebar_docking_state(); }
|
||||
|
||||
void Plater::reset_window_layout() { p->reset_window_layout(); }
|
||||
void Plater::reset_window_layout()
|
||||
{
|
||||
p->reset_window_layout();
|
||||
#ifdef SLIC3R_CAD
|
||||
// The Design tab docks its own sidebar.
|
||||
if (DesignPanel* design = DesignPanel::if_built())
|
||||
design->reset_window_layout();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Plater::add_dock_pane(wxWindow* window, const std::string& name, const wxString& caption, const std::string& dock,
|
||||
const wxSize& size, std::function<void()> on_close)
|
||||
|
||||
Reference in new issue
Block a user