mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Improvements of assigning the layer span to the layer slider
on slice update.
This commit is contained in:
parent
5553d10c1e
commit
5632279213
4 changed files with 88 additions and 59 deletions
|
@ -1506,6 +1506,21 @@ void PrusaDoubleSlider::SetHigherValue(const int higher_val)
|
|||
ProcessWindowEvent(e);
|
||||
}
|
||||
|
||||
void PrusaDoubleSlider::SetSelectionSpan(const int lower_val, const int higher_val)
|
||||
{
|
||||
m_lower_value = std::max(lower_val, m_min_value);
|
||||
m_higher_value = std::max(std::min(higher_val, m_max_value), m_lower_value);
|
||||
if (m_lower_value < m_higher_value)
|
||||
m_is_one_layer = false;
|
||||
|
||||
Refresh();
|
||||
Update();
|
||||
|
||||
wxCommandEvent e(wxEVT_SCROLL_CHANGED);
|
||||
e.SetEventObject(this);
|
||||
ProcessWindowEvent(e);
|
||||
}
|
||||
|
||||
void PrusaDoubleSlider::SetMaxValue(const int max_value)
|
||||
{
|
||||
m_max_value = max_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue