mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
Improve gcode preview navigation (#5326)
* preview: home/end to move to start/end step of the layer Add HOME and END key action to preview tab which moves horizontal slider position to a first and last position respectively * preview: cross-layer gcode inspection Automatically advance gcode preview to the next layer when pressing right at the last step of the layer. Same for the first step of the layer: pressing 'left' will switch preview to the previous layer
This commit is contained in:
parent
7a335590e2
commit
6369772510
3 changed files with 32 additions and 36 deletions
|
@ -1732,12 +1732,14 @@ void GCodeViewer::update_moves_slider(bool set_to_max)
|
|||
++count;
|
||||
}
|
||||
|
||||
bool keep_min = m_moves_slider->GetActiveValue() == m_moves_slider->GetMinValue();
|
||||
|
||||
m_moves_slider->SetSliderValues(values);
|
||||
m_moves_slider->SetSliderAlternateValues(alternate_values);
|
||||
m_moves_slider->SetMaxValue(view.endpoints.last - view.endpoints.first);
|
||||
m_moves_slider->SetSelectionSpan(view.current.first - view.endpoints.first, view.current.last - view.endpoints.first);
|
||||
if (set_to_max)
|
||||
m_moves_slider->SetHigherValue(m_moves_slider->GetMaxValue());
|
||||
m_moves_slider->SetHigherValue(keep_min ? m_moves_slider->GetMinValue() : m_moves_slider->GetMaxValue());
|
||||
}
|
||||
|
||||
void GCodeViewer::update_layers_slider_mode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue