mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 22:02:10 +00:00
FIX: remove some unnecessary refresh to reduce page faults
jira: [none] Change-Id: If4dae82f7aae243db033fe9c8d4d1ab25f625557 (cherry picked from commit b1fa2421c0425ad077b899e1d793cde219826042)
This commit is contained in:
@@ -687,7 +687,6 @@ void AMSextruder::OnAmsLoading(bool load, int nozzle_id, wxColour col /*= AMS_CO
|
||||
}
|
||||
}
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void AMSextruder::updateNozzleNum(int nozzle_num)
|
||||
@@ -2286,21 +2285,25 @@ void AMSRoadDownPart::doRender(wxDC& dc)
|
||||
void AMSRoadDownPart::UpdatePassRoad(AMSPanelPos pos, int len, AMSPassRoadSTEP step) {
|
||||
if (m_nozzle_num >= 2){
|
||||
if (pos == AMSPanelPos::LEFT_PANEL){
|
||||
if (m_left_road_length == len && m_pass_road_left_step == step){ return; }
|
||||
m_left_road_length = len;;
|
||||
m_pass_road_left_step = step;
|
||||
}
|
||||
else{
|
||||
if (m_right_road_length == len && m_pass_road_right_step == step) { return; }
|
||||
m_right_road_length = len;
|
||||
m_pass_road_right_step = step;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (pos == AMSPanelPos::LEFT_PANEL) {
|
||||
if (m_left_road_length == len && m_pass_road_left_step == step && m_right_road_length == -1) { return; }
|
||||
m_left_road_length = len;
|
||||
m_right_road_length = -1;
|
||||
m_pass_road_left_step = step;
|
||||
}
|
||||
else {
|
||||
if (m_right_road_length == len && m_pass_road_right_step == step && m_left_road_length == -1) { return; }
|
||||
m_right_road_length = len;
|
||||
m_left_road_length = -1;
|
||||
m_pass_road_right_step = step;
|
||||
|
||||
@@ -113,10 +113,14 @@ void ProgressBar::Reset()
|
||||
}
|
||||
|
||||
void ProgressBar::SetProgress(int step)
|
||||
{
|
||||
m_disable = false;
|
||||
{
|
||||
if (step < 0) return;
|
||||
//if (step == m_step) return;
|
||||
if (m_disable == false && m_step == step)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_disable = false;
|
||||
m_step = step;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user