mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +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;
|
||||
|
||||
@@ -114,9 +114,13 @@ 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();
|
||||
}
|
||||
|
||||
@@ -995,6 +995,11 @@ void ScalableButton::SetBitmap_(const ScalableBitmap& bmp)
|
||||
|
||||
bool ScalableButton::SetBitmap_(const std::string& bmp_name)
|
||||
{
|
||||
if (m_current_icon_name == bmp_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
m_current_icon_name = bmp_name;
|
||||
if (m_current_icon_name.empty())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user