Follow-up of 3fdc48452e
-> Modified logic to disable horizontal slider in preview
This commit is contained in:
parent
3fdc48452e
commit
6d00ed9e2f
@ -447,7 +447,7 @@ void Control::render()
|
|||||||
// and only in a case of no-empty m_values
|
// and only in a case of no-empty m_values
|
||||||
draw_colored_band(dc);
|
draw_colored_band(dc);
|
||||||
|
|
||||||
if (this->IsEnabled()) {
|
if (!m_render_as_disabled) {
|
||||||
// draw line
|
// draw line
|
||||||
draw_scroll_line(dc, lower_pos, higher_pos);
|
draw_scroll_line(dc, lower_pos, higher_pos);
|
||||||
|
|
||||||
|
@ -228,6 +228,9 @@ public:
|
|||||||
void SetModeAndOnlyExtruder(const bool is_one_extruder_printed_model, const int only_extruder);
|
void SetModeAndOnlyExtruder(const bool is_one_extruder_printed_model, const int only_extruder);
|
||||||
void SetExtruderColors(const std::vector<std::string>& extruder_colors);
|
void SetExtruderColors(const std::vector<std::string>& extruder_colors);
|
||||||
|
|
||||||
|
void set_render_as_disabled(bool value) { m_render_as_disabled = value; }
|
||||||
|
bool is_rendering_as_disabled() const { return m_render_as_disabled; }
|
||||||
|
|
||||||
bool is_horizontal() const { return m_style == wxSL_HORIZONTAL; }
|
bool is_horizontal() const { return m_style == wxSL_HORIZONTAL; }
|
||||||
bool is_one_layer() const { return m_is_one_layer; }
|
bool is_one_layer() const { return m_is_one_layer; }
|
||||||
bool is_lower_at_min() const { return m_lower_value == m_min_value; }
|
bool is_lower_at_min() const { return m_lower_value == m_min_value; }
|
||||||
@ -334,6 +337,9 @@ private:
|
|||||||
int m_max_value;
|
int m_max_value;
|
||||||
int m_lower_value;
|
int m_lower_value;
|
||||||
int m_higher_value;
|
int m_higher_value;
|
||||||
|
|
||||||
|
bool m_render_as_disabled{ false };
|
||||||
|
|
||||||
ScalableBitmap m_bmp_thumb_higher;
|
ScalableBitmap m_bmp_thumb_higher;
|
||||||
ScalableBitmap m_bmp_thumb_lower;
|
ScalableBitmap m_bmp_thumb_lower;
|
||||||
ScalableBitmap m_bmp_add_tick_on;
|
ScalableBitmap m_bmp_add_tick_on;
|
||||||
|
@ -1173,8 +1173,9 @@ void Preview::update_moves_slider()
|
|||||||
|
|
||||||
void Preview::enable_moves_slider(bool enable)
|
void Preview::enable_moves_slider(bool enable)
|
||||||
{
|
{
|
||||||
if (m_moves_slider != nullptr && m_moves_slider->IsEnabled() != enable) {
|
bool render_as_disabled = !enable;
|
||||||
m_moves_slider->Enable(enable);
|
if (m_moves_slider != nullptr && m_moves_slider->is_rendering_as_disabled() != render_as_disabled) {
|
||||||
|
m_moves_slider->set_render_as_disabled(render_as_disabled);
|
||||||
m_moves_slider->Refresh();
|
m_moves_slider->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user