mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
NEW:disabled materials item will retain original color
jira:[STUDIO-10539] Change-Id: Iabdbc6582dae5bcb2ec31775163949f0d451dcca (cherry picked from commit fdb57550aa01ae88538b2de954670b84c6e72baa)
This commit is contained in:
@@ -99,16 +99,18 @@ void MaterialItem::reset_ams_info() {
|
||||
void MaterialItem::disable()
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
this->Disable();
|
||||
Refresh();
|
||||
//this->Disable();
|
||||
//Refresh();
|
||||
m_enable = false;
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialItem::enable()
|
||||
{
|
||||
if (!IsEnabled()) {
|
||||
this->Enable();
|
||||
Refresh();
|
||||
/*this->Enable();
|
||||
Refresh();*/
|
||||
m_enable = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
bool m_selected {false};
|
||||
bool m_warning{false};
|
||||
bool m_match {true};
|
||||
bool m_enable {true};
|
||||
|
||||
void msw_rescale();
|
||||
void allow_paint_dropdown(bool flag);
|
||||
@@ -116,7 +117,6 @@ public:
|
||||
void on_selected();
|
||||
void on_warning();
|
||||
|
||||
void on_left_down(wxMouseEvent &evt);
|
||||
void paintEvent(wxPaintEvent &evt);
|
||||
virtual void render(wxDC &dc);
|
||||
void match(bool mat);
|
||||
|
||||
@@ -3841,6 +3841,7 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
item->SetToolTip(m_ams_tooltip);
|
||||
item->Bind(wxEVT_LEFT_UP, [this, item, materials, extruder](wxMouseEvent &e) {});
|
||||
item->Bind(wxEVT_LEFT_DOWN, [this, item, materials, extruder](wxMouseEvent &e) {
|
||||
if (!item->m_enable) {return;}
|
||||
MaterialHash::iterator iter = m_materialList.begin();
|
||||
while (iter != m_materialList.end()) {
|
||||
int id = iter->first;
|
||||
@@ -4346,6 +4347,8 @@ void SelectMachineDialog::set_default_from_sdcard()
|
||||
|
||||
item->Bind(wxEVT_LEFT_UP, [this, item, materials](wxMouseEvent& e) {});
|
||||
item->Bind(wxEVT_LEFT_DOWN, [this, obj_, item, materials, diameters_count, fo](wxMouseEvent& e) {
|
||||
if (!item->m_enable) {return;}
|
||||
|
||||
MaterialHash::iterator iter = m_materialList.begin();
|
||||
while (iter != m_materialList.end()) {
|
||||
int id = iter->first;
|
||||
|
||||
Reference in New Issue
Block a user