mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00

* FIX: mistake in filament vendor jira:[NEW] Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I3af712e417379d8b98ae18feebffe465bfa1e72d * NEW:set customized materials for the A1 P1 series Change-Id: I9c34f62867c074bf9ebb315013e5e40526e0eac7 * FIX: the flow rate ratio crashes after load model for third party printer Jira: 5244 Change-Id: Idd829c9d99eeba9d180653ac8de4e51b9a0d6370 * FIX: The maximum value is not printed in PA line mode Jira: 5046 4951 Change-Id: Ic81f9a75ce7f088fe950fdde283ff5c942cd6e83 * ENH:add preset check for sending files Change-Id: Ia3313d281b5ce91e277b380498014ffdac5debd3 * FIX: locale loading user preset Change-Id: I88521e4b10cb802d9253eb79a6b78b3286f15a33 Jira: STUDIO-5436 * FIX: sync user preset notify crash on exit Change-Id: I88f5dbcbd487293ea847ea6092efb61744399541 Jira: STUDIO-5413 * ci: update build version to 01.08.01.56 Change-Id: Id7a9718d5f920da50d52fd2ef220acf5d3270d3c * GUI/Field: Fix crash in color picker init (#2220) wxButton->GetBitmap() may return an invalid wxBitmap. Guard against this. * FIX: custom filament preset display in cali history issue jira: new Change-Id: I4145450a231adff542ab1a7428b3479f4074e06a * FIX: meshboolean transform result issue jira: STUDIO-5425 Change-Id: If66fe909ce4458c1b3192e4fd8a3d758fe7c7eaa * FIX: fix combobox and delete btn in filament setting enabled Jira: XXXX Change-Id: I8b659bd77ceb97c8cea9d3e5e931f4ea50822721 * ci: update build version to 01.08.01.57 Change-Id: I7a6f5439863ca81275ae8b80f1b5cf0bb36c4c0f * Fix crashing of flow rate calibration post BS 1.8 merge * Revert Staggered Inner Seam logic from Prusa slicer that was overwritten by the BS1.8 update --------- Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Co-authored-by: xun.zhang <xun.zhang@bambulab.com> Co-authored-by: hu.wang <hu.wang@bambulab.com> Co-authored-by: zhimin.zeng <zhimin.zeng@bambulab.com> Co-authored-by: tao wang <tao.wang@bambulab.com> Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com> Co-authored-by: gerrit <gerrit@bambulab.com> Co-authored-by: mia <652892+mia-0@users.noreply.github.com> Co-authored-by: liz.li <liz.li@bambulab.com> Co-authored-by: maosheng.wei <maosheng.wei@bambulab.com>
92 lines
2.5 KiB
C++
92 lines
2.5 KiB
C++
#include "ParamsDialog.hpp"
|
|
#include "I18N.hpp"
|
|
#include "ParamsPanel.hpp"
|
|
#include "GUI_App.hpp"
|
|
#include "MainFrame.hpp"
|
|
#include "Tab.hpp"
|
|
|
|
#include "libslic3r/Utils.hpp"
|
|
|
|
namespace pt = boost::property_tree;
|
|
typedef pt::ptree JSON;
|
|
|
|
namespace Slic3r {
|
|
namespace GUI {
|
|
|
|
|
|
ParamsDialog::ParamsDialog(wxWindow * parent)
|
|
: DPIDialog(parent, wxID_ANY, "", wxDefaultPosition,
|
|
wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
|
|
{
|
|
m_panel = new ParamsPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL);
|
|
auto* topsizer = new wxBoxSizer(wxVERTICAL);
|
|
topsizer->Add(m_panel, 1, wxALL | wxEXPAND, 0, NULL);
|
|
|
|
SetSizerAndFit(topsizer);
|
|
SetSize({75 * em_unit(), 60 * em_unit()});
|
|
|
|
Layout();
|
|
Center();
|
|
Bind(wxEVT_SHOW, [this](auto &event) {
|
|
if (IsShown()) {
|
|
m_winDisabler = new wxWindowDisabler(this);
|
|
} else {
|
|
delete m_winDisabler;
|
|
m_winDisabler = nullptr;
|
|
}
|
|
});
|
|
Bind(wxEVT_CLOSE_WINDOW, [this](auto& event) {
|
|
#if 0
|
|
auto tab = dynamic_cast<Tab *>(m_panel->get_current_tab());
|
|
if (event.CanVeto() && tab->m_presets->current_is_dirty()) {
|
|
bool ok = tab->may_discard_current_dirty_preset();
|
|
if (!ok)
|
|
event.Veto();
|
|
else {
|
|
tab->m_presets->discard_current_changes();
|
|
tab->load_current_preset();
|
|
Hide();
|
|
}
|
|
} else {
|
|
Hide();
|
|
}
|
|
#else
|
|
Hide();
|
|
if (!m_editing_filament_id.empty()) {
|
|
FilamentInfomation *filament_info = new FilamentInfomation();
|
|
filament_info->filament_id = m_editing_filament_id;
|
|
wxQueueEvent(wxGetApp().plater(), new SimpleEvent(EVT_MODIFY_FILAMENT, filament_info));
|
|
m_editing_filament_id.clear();
|
|
}
|
|
#endif
|
|
wxGetApp().sidebar().finish_param_edit();
|
|
});
|
|
|
|
//wxGetApp().UpdateDlgDarkUI(this);
|
|
}
|
|
|
|
void ParamsDialog::Popup()
|
|
{
|
|
wxGetApp().UpdateDlgDarkUI(this);
|
|
#ifdef __WIN32__
|
|
Reparent(wxGetApp().mainframe);
|
|
#endif
|
|
Center();
|
|
if (m_panel && m_panel->get_current_tab()) {
|
|
bool just_edit = false;
|
|
if (!m_editing_filament_id.empty()) just_edit = true;
|
|
dynamic_cast<Tab *>(m_panel->get_current_tab())->set_just_edit(just_edit);
|
|
}
|
|
Show();
|
|
}
|
|
|
|
void ParamsDialog::on_dpi_changed(const wxRect &suggested_rect)
|
|
{
|
|
Fit();
|
|
SetSize({75 * em_unit(), 60 * em_unit()});
|
|
m_panel->msw_rescale();
|
|
Refresh();
|
|
}
|
|
|
|
} // namespace GUI
|
|
} // namespace Slic3r
|