mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-29 06:13:16 +08:00
FIX: ams control display bug
jira: none Change-Id: I72c5977ff4246c19f4bf5ce7e20f797c0efe9e9a
This commit is contained in:
parent
f4ce4b3600
commit
7f43d427c3
@ -730,9 +730,11 @@ public:
|
|||||||
txt1->SetForegroundColour(0x6B6B6B);
|
txt1->SetForegroundColour(0x6B6B6B);
|
||||||
int ams4 = 0, ams1 = 0;
|
int ams4 = 0, ams1 = 0;
|
||||||
GetAMSCount(index, ams4, ams1);
|
GetAMSCount(index, ams4, ams1);
|
||||||
auto val4 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4, ams4);
|
auto val4 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4 - ams1, ams4);
|
||||||
auto val1 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 8, ams1);
|
auto val1 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4 - ams4, ams1);
|
||||||
auto event_handler = [index, val4, val1, extruder](auto &evt) {
|
auto event_handler = [index, val4, val1, extruder](auto &evt) {
|
||||||
|
val4->SetRange(0, 4 - val1->GetValue());
|
||||||
|
val1->SetRange(0, 4 - val4->GetValue());
|
||||||
SetAMSCount(index, val4->GetValue(), val1->GetValue());
|
SetAMSCount(index, val4->GetValue(), val1->GetValue());
|
||||||
UpdateAMSCount(index, extruder);
|
UpdateAMSCount(index, extruder);
|
||||||
};
|
};
|
||||||
@ -900,6 +902,10 @@ ExtruderGroup::ExtruderGroup(wxWindow * parent, int index, wxString const &title
|
|||||||
void ExtruderGroup::update_ams()
|
void ExtruderGroup::update_ams()
|
||||||
{
|
{
|
||||||
int display_capacity = 8;
|
int display_capacity = 8;
|
||||||
|
|
||||||
|
if (ams_n4 * 4 + ams_n1 * 2 <= 8)
|
||||||
|
is_upward = false;
|
||||||
|
|
||||||
bool display_front_ams = !is_upward;
|
bool display_front_ams = !is_upward;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (; i < ams_n4 && i < 4; ++i) {
|
for (; i < ams_n4 && i < 4; ++i) {
|
||||||
|
@ -2523,6 +2523,14 @@ void AMSPreview::Update(AMSinfo amsinfo)
|
|||||||
{
|
{
|
||||||
m_amsinfo = amsinfo;
|
m_amsinfo = amsinfo;
|
||||||
m_ams_item_type = amsinfo.ams_type;
|
m_ams_item_type = amsinfo.ams_type;
|
||||||
|
|
||||||
|
if (m_ams_item_type == AMSModel::GENERIC_AMS || m_ams_item_type == AMSModel::AMS_LITE || m_ams_item_type == AMSModel::N3F_AMS) {
|
||||||
|
SetMinSize(AMS_PREV_FOUR_SIZE);
|
||||||
|
SetMaxSize(AMS_PREV_FOUR_SIZE);
|
||||||
|
} else {
|
||||||
|
SetMinSize(AMS_PREV_SINGLE_SIZE);
|
||||||
|
SetMaxSize(AMS_PREV_SINGLE_SIZE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMSPreview::create(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
|
void AMSPreview::create(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user