diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 8427f9eb2..31e2f4793 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -35,7 +35,9 @@ #define HOLD_COUNT_MAX 3 #define HOLD_COUNT_CAMERA 6 + #define HOLD_TIME_MAX 3 // 3 seconds +#define HOLD_TIME_SWITCHING 6 // 6 seconds #define GET_VERSION_RETRYS 10 #define RETRY_INTERNAL 2000 diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index becdf9d1a..562782c20 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -408,10 +408,17 @@ ExtruderSwithingStatus::ExtruderSwithingStatus(wxWindow *parent) void ExtruderSwithingStatus::updateBy(MachineObject *obj) { m_obj = obj; - Show(m_obj != nullptr); - if (m_obj && (time(nullptr) - m_last_ctrl_time) > HOLD_TIME_MAX) + if (!m_obj) { - updateBy(obj->m_extder_data); + Show(false); + } + else + { + /*do not display while command sended in a mean while*/ + if ((time(nullptr) - m_last_ctrl_time) > HOLD_TIME_SWITCHING) + { + updateBy(obj->m_extder_data); + } } }