mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
FIX:romove font style preview
Change-Id: I1e8f2ffd94db967f17fa561fd5c56a20f718631b
This commit is contained in:
parent
4ea3d16fcc
commit
1da9bfcc13
5 changed files with 76 additions and 75 deletions
|
@ -32,7 +32,7 @@ GLGizmoText::GLGizmoText(GLCanvas3D& parent, const std::string& icon_filename, u
|
|||
|
||||
bool GLGizmoText::on_init()
|
||||
{
|
||||
init_occt_fonts();
|
||||
m_avail_font_names = init_occt_fonts();
|
||||
m_shortcut_key = WXK_CONTROL_T;
|
||||
return true;
|
||||
}
|
||||
|
@ -138,8 +138,6 @@ void GLGizmoText::pop_combo_style()
|
|||
// BBS
|
||||
void GLGizmoText::on_render_input_window(float x, float y, float bottom_limit)
|
||||
{
|
||||
std::vector<std::string> m_avail_font_names = wxGetApp().imgui()->get_fonts_names();
|
||||
|
||||
const float win_h = ImGui::GetWindowHeight();
|
||||
y = std::min(y, bottom_limit - win_h);
|
||||
GizmoImguiSetNextWIndowPos(x, y, ImGuiCond_Always, 0.0f, 0.0f);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace GUI {
|
|||
class GLGizmoText : public GLGizmoBase
|
||||
{
|
||||
private:
|
||||
//std::vector<std::string> m_avail_font_names;
|
||||
std::vector<std::string> m_avail_font_names;
|
||||
char m_text[1024] = { 0 };
|
||||
std::string m_font_name;
|
||||
float m_font_size = 16.f;
|
||||
|
|
|
@ -1485,9 +1485,9 @@ bool GLGizmosManager::activate_gizmo(EType type)
|
|||
GLGizmoBase* new_gizmo = type == Undefined ? nullptr : m_gizmos[type].get();
|
||||
|
||||
if (old_gizmo) {
|
||||
if (m_current == Text) {
|
||||
wxGetApp().imgui()->destroy_fonts_texture();
|
||||
}
|
||||
//if (m_current == Text) {
|
||||
// wxGetApp().imgui()->destroy_fonts_texture();
|
||||
//}
|
||||
old_gizmo->set_state(GLGizmoBase::Off);
|
||||
if (old_gizmo->get_state() != GLGizmoBase::Off)
|
||||
return false; // gizmo refused to be turned off, do nothing.
|
||||
|
@ -1508,9 +1508,9 @@ bool GLGizmosManager::activate_gizmo(EType type)
|
|||
m_current = type;
|
||||
|
||||
if (new_gizmo) {
|
||||
if (m_current == Text) {
|
||||
wxGetApp().imgui()->load_fonts_texture();
|
||||
}
|
||||
//if (m_current == Text) {
|
||||
// wxGetApp().imgui()->load_fonts_texture();
|
||||
//}
|
||||
new_gizmo->set_state(GLGizmoBase::On);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue