#658 fix coPoints size computation

This commit is contained in:
supermerill 2020-11-15 00:11:25 +01:00
parent c8397eb3fd
commit 16d3314d9f
2 changed files with 11 additions and 2 deletions

View File

@ -460,6 +460,7 @@ public:
x_textctrl->Disable();
y_textctrl->Disable(); }
wxSizer* getSizer() override { return sizer; }
//for height
wxWindow* getWindow() override { return dynamic_cast<wxWindow*>(x_textctrl); }
};

View File

@ -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;