mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed crash when moving horizontal slider thumb in preview with no toolpath active
This commit is contained in:
parent
9e0e597284
commit
2ecd78b0d5
5 changed files with 25 additions and 6 deletions
|
@ -1162,8 +1162,7 @@ void Preview::update_moves_slider()
|
|||
|
||||
std::vector<double> values(view.endpoints.last - view.endpoints.first + 1);
|
||||
unsigned int count = 0;
|
||||
for (unsigned int i = view.endpoints.first; i <= view.endpoints.last; ++i)
|
||||
{
|
||||
for (unsigned int i = view.endpoints.first; i <= view.endpoints.last; ++i) {
|
||||
values[count++] = static_cast<double>(i + 1);
|
||||
}
|
||||
|
||||
|
@ -1171,6 +1170,12 @@ void Preview::update_moves_slider()
|
|||
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);
|
||||
}
|
||||
|
||||
void Preview::enable_moves_slider(bool enable)
|
||||
{
|
||||
if (m_moves_slider != nullptr)
|
||||
m_moves_slider->Enable(enable);
|
||||
}
|
||||
#else
|
||||
void Preview::update_double_slider_from_canvas(wxKeyEvent & event)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue