Refactoring of BedShapePanel and BedShapeDialog

This commit is contained in:
Enrico Turri 2019-07-17 14:53:02 +02:00
parent ce5618fb27
commit 75c53a53b6
4 changed files with 28 additions and 29 deletions

View file

@ -1856,9 +1856,9 @@ void TabPrinter::build_fff()
btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e)
{
BedShapeDialog dlg(this);
dlg.build_dialog(m_config->option<ConfigOptionPoints>("bed_shape"));
dlg.build_dialog(*m_config->option<ConfigOptionPoints>("bed_shape"));
if (dlg.ShowModal() == wxID_OK) {
std::vector<Vec2d> shape = dlg.GetValue();
std::vector<Vec2d> shape = dlg.get_bed_shape();
if (!shape.empty())
{
load_key_value("bed_shape", shape);
@ -2062,9 +2062,9 @@ void TabPrinter::build_sla()
btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e)
{
BedShapeDialog dlg(this);
dlg.build_dialog(m_config->option<ConfigOptionPoints>("bed_shape"));
dlg.build_dialog(*m_config->option<ConfigOptionPoints>("bed_shape"));
if (dlg.ShowModal() == wxID_OK) {
std::vector<Vec2d> shape = dlg.GetValue();
std::vector<Vec2d> shape = dlg.get_bed_shape();
if (!shape.empty())
{
load_key_value("bed_shape", shape);