diff --git a/src/slic3r/GUI/Field.hpp b/src/slic3r/GUI/Field.hpp index da2b94958..5d45f4154 100644 --- a/src/slic3r/GUI/Field.hpp +++ b/src/slic3r/GUI/Field.hpp @@ -460,6 +460,7 @@ public: x_textctrl->Disable(); y_textctrl->Disable(); } wxSizer* getSizer() override { return sizer; } + //for height wxWindow* getWindow() override { return dynamic_cast(x_textctrl); } }; diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp index 48638fc03..37213fba5 100644 --- a/src/slic3r/GUI/OG_CustomCtrl.cpp +++ b/src/slic3r/GUI/OG_CustomCtrl.cpp @@ -201,8 +201,16 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/) h_pos += 2 * blinking_button_width; if (field == field_in) - break; - h_pos += field->getWindow()->GetSize().x; + break; + if (field->getSizer()) { + for (auto child : field->getSizer()->GetChildren()) { + if (child->IsWindow() && child->IsShown()) { + wxSize sz = child->GetWindow()->GetSize(); + h_pos += sz.x + m_h_gap; + } + } + } else + h_pos += field->getWindow()->GetSize().x; if (option_set.size() == 1 && option_set.front().opt.full_width) break;