FIX: switch diameter button order & total ams count

Change-Id: Ife11b131269cd5b1ed6c1555621d5ea727a07027
Jira: STUDIO-9984, STUDIO-9739
(cherry picked from commit 35e8c0d5dab916ee1b103a475d638ad7958e561b)
This commit is contained in:
chunmao.guo
2025-01-19 10:07:29 +08:00
committed by Noisyfox
parent 0e763dd300
commit d1f039b5f3
3 changed files with 11 additions and 5 deletions

View File

@@ -456,6 +456,7 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr<PrinterFileSystem> wfs)
fs->SetUrl("0");
return;
}
BOOST_LOG_TRIVIAL(info) << "MediaFilePanel::fetchUrl: " << m_local_proto << m_remote_proto;
m_waiting_support = false;
NetworkAgent *agent = wxGetApp().getAgent();
std::string agent_version = agent ? agent->get_version() : "";

View File

@@ -278,6 +278,7 @@ void MediaPlayCtrl::Play()
return;
}
BOOST_LOG_TRIVIAL(info) << "MediaPlayCtrl::Play: " << m_lan_proto << m_remote_proto << m_disable_lan;
NetworkAgent *agent = wxGetApp().getAgent();
std::string agent_version = agent ? agent->get_version() : "";
if (m_lan_proto > MachineObject::LVL_Disable && (m_lan_mode || !m_remote_proto) && !m_disable_lan && !m_lan_ip.empty()) {
@@ -334,7 +335,7 @@ void MediaPlayCtrl::Play()
if (agent) {
std::string protocols[] = {"", "\"tutk\"", "\"agora\"", "\"tutk\",\"agora\""};
agent->get_camera_url(m_machine + "|" + m_dev_ver + "|" + protocols[m_remote_proto],
[this, m = m_machine, v = agent_version, dv = m_dev_ver](std::string url) {
[this, m = m_machine, v = agent_version, dv = m_dev_ver](std::string url) {
if (boost::algorithm::starts_with(url, "bambu:///")) {
url += "&device=" + into_u8(m);
url += "&net_ver=" + v;
@@ -541,7 +542,9 @@ void MediaPlayCtrl::ToggleStream()
}
NetworkAgent *agent = wxGetApp().getAgent();
if (!agent) return;
agent->get_camera_url(m_machine, [this, m = m_machine, v = agent->get_version(), dv = m_dev_ver](std::string url) {
std::string protocols[] = {"", "\"tutk\"", "\"agora\"", "\"tutk\",\"agora\""};
agent->get_camera_url(m_machine + "|" + m_dev_ver + "|" + protocols[m_remote_proto],
[this, m = m_machine, v = agent->get_version(), dv = m_dev_ver](std::string url) {
if (boost::algorithm::starts_with(url, "bambu:///")) {
url += "&device=" + m;
url += "&net_ver=" + v;

View File

@@ -842,9 +842,11 @@ public:
txt1->SetBackgroundColour(0xF8F8F8);
txt1->SetForegroundColour("#262E30");
int ams4 = 0, ams1 = 0;
int oth4 = 0, oth1 = 0;
GetAMSCount(index, ams4, ams1);
auto val4 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4, ams4);
auto val1 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 8, ams1);
GetAMSCount(1 - index, oth4, oth1);
auto val4 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4 - oth4, ams4);
auto val1 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 8 - oth1, ams1);
auto event_handler = [index, val4, val1, extruder](auto &evt) {
SetAMSCount(index, val4->GetValue(), val1->GetValue());
UpdateAMSCount(index, extruder);
@@ -1635,7 +1637,7 @@ Sidebar::Sidebar(Plater *parent)
wxBoxSizer* bSizer39;
bSizer39 = new wxBoxSizer( wxHORIZONTAL );
p->m_filament_icon = new ScalableButton(p->m_panel_filament_title, wxID_ANY, "filament");
p->m_staticText_filament_settings = new Label(p->m_panel_filament_title, _L("Filament"), LB_PROPAGATE_MOUSE_EVENT);
p->m_staticText_filament_settings = new Label(p->m_panel_filament_title, _L("Filaments"), LB_PROPAGATE_MOUSE_EVENT);
bSizer39->Add(p->m_filament_icon, 0, wxALIGN_CENTER | wxLEFT, FromDIP(SidebarProps::TitlebarMargin()));
bSizer39->AddSpacer(FromDIP(SidebarProps::ElementSpacing()));
bSizer39->Add( p->m_staticText_filament_settings, 0, wxALIGN_CENTER );