mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Fix of SPE-1015 (Colorchange doesn't work correct on last and first layers)
This commit is contained in:
@@ -2218,7 +2218,8 @@ void DoubleSlider::SetTicksValues(const std::vector<double>& heights)
|
||||
for (auto h : heights) {
|
||||
while (i < m_values.size() && m_values[i].second - 1e-6 < h)
|
||||
++i;
|
||||
if (i == m_values.size())
|
||||
// don't miss last layer if it is
|
||||
if (i == m_values.size() && fabs(m_values[i-1].second - h) > EPSILON)
|
||||
return;
|
||||
m_ticks.insert(i-1);
|
||||
}
|
||||
@@ -2293,6 +2294,10 @@ void DoubleSlider::draw_action_icon(wxDC& dc, const wxPoint pt_beg, const wxPoin
|
||||
{
|
||||
const int tick = m_selection == ssLower ? m_lower_value : m_higher_value;
|
||||
|
||||
// suppress add tick on first layer
|
||||
if (tick == 0)
|
||||
return;
|
||||
|
||||
wxBitmap* icon = m_is_action_icon_focesed ? &m_bmp_add_tick_off.bmp() : &m_bmp_add_tick_on.bmp();
|
||||
if (m_ticks.find(tick) != m_ticks.end())
|
||||
icon = m_is_action_icon_focesed ? &m_bmp_del_tick_off.bmp() : &m_bmp_del_tick_on.bmp();
|
||||
|
||||
Reference in New Issue
Block a user