src/mainwindow.cpp

changeset 108
94c92c923713
parent 106
128efb9d148b
child 109
40a1cf2f38f5
--- a/src/mainwindow.cpp	Sat Jul 24 01:50:38 2021 +0300
+++ b/src/mainwindow.cpp	Sun Jul 25 13:49:37 2021 +0300
@@ -213,6 +213,7 @@
 	document->restoreSplitterState(this->documentSplitterState);
 	connect(document, &Document::splitterChanged, this, &MainWindow::handleDocumentSplitterChange);
 	connect(document, &Document::mouseClick, this, &MainWindow::canvasMouseReleased);
+	connect(document, &Document::mouseMove, this, &MainWindow::canvasMouseMoved);
 }
 
 void MainWindow::runSettingsEditor()
@@ -429,9 +430,12 @@
 	Q_UNUSED(event)
 }
 
-void MainWindow::canvasMouseMoved(QMouseEvent* event)
+void MainWindow::canvasMouseMoved(const Canvas::MouseMoveInfo& info)
 {
-	Q_UNUSED(event)
+	if (this->selectedTool != nullptr)
+	{
+		this->selectedTool->mouseMove(info);
+	}
 }
 
 void MainWindow::canvasKeyReleased(QKeyEvent* event)

mercurial