Added hiding of MMU segmentation gizmo when it is selected printer with only one extruder.
This commit is contained in:
parent
38bb7d2950
commit
1b144e80bd
2 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include "slic3r/GUI/GUI_App.hpp"
|
#include "slic3r/GUI/GUI_App.hpp"
|
||||||
#include "slic3r/GUI/ImGuiWrapper.hpp"
|
#include "slic3r/GUI/ImGuiWrapper.hpp"
|
||||||
#include "slic3r/GUI/Plater.hpp"
|
#include "slic3r/GUI/Plater.hpp"
|
||||||
|
#include "libslic3r/PresetBundle.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
@ -32,7 +33,11 @@ std::string GLGizmoMmuSegmentation::on_get_name() const
|
||||||
return (_L("MMU painting") + " [N]").ToUTF8().data();
|
return (_L("MMU painting") + " [N]").ToUTF8().data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GLGizmoMmuSegmentation::on_is_selectable() const
|
||||||
|
{
|
||||||
|
return (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptFFF
|
||||||
|
&& wxGetApp().get_mode() != comSimple && wxGetApp().extruders_cnt() > 1);
|
||||||
|
}
|
||||||
|
|
||||||
bool GLGizmoMmuSegmentation::on_init()
|
bool GLGizmoMmuSegmentation::on_init()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,8 @@ protected:
|
||||||
void on_render_input_window(float x, float y, float bottom_limit) override;
|
void on_render_input_window(float x, float y, float bottom_limit) override;
|
||||||
std::string on_get_name() const override;
|
std::string on_get_name() const override;
|
||||||
|
|
||||||
|
bool on_is_selectable() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool on_init() override;
|
bool on_init() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue