From 928d45c3fbfb6b00d8e0b79b63934ebd080b9456 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sun, 3 Jan 2021 12:30:16 +0100 Subject: refactor drawing code --- src/main_window.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main_window.cc') diff --git a/src/main_window.cc b/src/main_window.cc index 26d9601..cd85ae7 100644 --- a/src/main_window.cc +++ b/src/main_window.cc @@ -81,6 +81,7 @@ void MainWindow::open(const QString &path) { slider, &QSlider::setValue); slider->setEnabled(true); + // Settings pane connect(dc, &DroneController::collision, settings_pane, &SettingsPane::addCollision); connect(settings_pane, &SettingsPane::sphereRadiusChanged, [&](double _) { settings_pane->clearCollisions(); }); @@ -88,6 +89,8 @@ void MainWindow::open(const QString &path) { dc, &DroneController::computeCollisions); settings_pane->setEnabled(true); + glw.setPainter(dc); + dc->computeCollisions(.1); pause(); } -- cgit v1.2.3-70-g09d2