mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 03:12:04 +08:00
Fix for #12877 - Color Change Added After Moving Slider
+ Fixed update of the ruler, when it was hidden and than shown + Added messed include in RulerForDoubleSlider.cpp (#12882) + Fixed some warnings
This commit is contained in:
parent
34346c9126
commit
1c0cb70faa
@ -969,8 +969,7 @@ void DSForLayers::Render(const int canvas_width, const int canvas_height, float
|
|||||||
|
|
||||||
void DSForLayers::force_ruler_update()
|
void DSForLayers::force_ruler_update()
|
||||||
{
|
{
|
||||||
if (m_show_ruler)
|
m_ruler.invalidate();
|
||||||
m_ruler.invalidate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DSForLayers::is_wipe_tower_layer(int tick) const
|
bool DSForLayers::is_wipe_tower_layer(int tick) const
|
||||||
|
@ -408,7 +408,7 @@ void Preview::create_sliders()
|
|||||||
|
|
||||||
m_layers_slider->set_callback_on_thumb_move( [this]() -> void { Preview::on_layers_slider_scroll_changed(); } );
|
m_layers_slider->set_callback_on_thumb_move( [this]() -> void { Preview::on_layers_slider_scroll_changed(); } );
|
||||||
|
|
||||||
m_layers_slider->set_callback_on_change_app_config([this](const std::string& key, const std::string& val) -> void {
|
m_layers_slider->set_callback_on_change_app_config([](const std::string& key, const std::string& val) -> void {
|
||||||
wxGetApp().app_config->set(key, val);
|
wxGetApp().app_config->set(key, val);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -545,6 +545,11 @@ bool ImGuiControl::draw_slider( int* higher_pos, int* lower_pos,
|
|||||||
m_lclick_on_selected_thumb = true;
|
m_lclick_on_selected_thumb = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::ItemHoverable(active_thumb, id) && ImGui::IsMouseDragging(0)) {
|
||||||
|
// invalidate active thumb clicking
|
||||||
|
m_active_thumb = ImRect(0.f, 0.f, 0.f, 0.f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update thumb position
|
// update thumb position
|
||||||
@ -621,7 +626,8 @@ bool ImGuiControl::draw_slider( int* higher_pos, int* lower_pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// draw label on mouse move
|
// draw label on mouse move
|
||||||
draw_label(move_label, mouse_pos_rc, false, true);
|
if (m_show_move_label)
|
||||||
|
draw_label(move_label, mouse_pos_rc, false, true);
|
||||||
|
|
||||||
return pos_changed;
|
return pos_changed;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
///|/
|
///|/
|
||||||
#include "RulerForDoubleSlider.hpp"
|
#include "RulerForDoubleSlider.hpp"
|
||||||
#include "libslic3r/CustomGCode.hpp"
|
#include "libslic3r/CustomGCode.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
using namespace Slic3r;
|
using namespace Slic3r;
|
||||||
using namespace CustomGCode;
|
using namespace CustomGCode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user