summaryrefslogtreecommitdiffstats
path: root/examples/curveeditorapp/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/curveeditorapp/mainwindow.cpp')
-rw-r--r--examples/curveeditorapp/mainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/curveeditorapp/mainwindow.cpp b/examples/curveeditorapp/mainwindow.cpp
index 7138b4e..6fbcd67 100644
--- a/examples/curveeditorapp/mainwindow.cpp
+++ b/examples/curveeditorapp/mainwindow.cpp
@@ -24,7 +24,6 @@
****************************************************************************/
#include "mainwindow.h"
#include "curveeditor.h"
-#include "curveeditorview.h"
#include "examplecurvemodel.h"
#include <QHBoxLayout>
@@ -58,8 +57,8 @@ MainWindow::MainWindow()
auto *model = new ExampleCurveModel;
auto *editor = new CurveEditor(model);
- auto zoomX = [editor](int val) { editor->view()->zoomX(static_cast<double>(val) / 1000.); };
- auto zoomY = [editor](int val) { editor->view()->zoomY(static_cast<double>(val) / 1000.); };
+ auto zoomX = [editor](int val) { editor->zoomX(static_cast<double>(val) / 1000.); };
+ auto zoomY = [editor](int val) { editor->zoomY(static_cast<double>(val) / 1000.); };
auto *box = new QVBoxLayout;
box->addWidget(editor);
@@ -71,6 +70,8 @@ MainWindow::MainWindow()
setCentralWidget(centralWidget);
resize(QSize(1070, 739));
+
+ model->createItems();
}
} // End namespace DesignTools.