src/mainwindow.cpp

changeset 109
40a1cf2f38f5
parent 108
94c92c923713
child 111
1f42c03fafca
equal deleted inserted replaced
108:94c92c923713 109:40a1cf2f38f5
212 this->ui->tabs->setCurrentWidget(document); 212 this->ui->tabs->setCurrentWidget(document);
213 document->restoreSplitterState(this->documentSplitterState); 213 document->restoreSplitterState(this->documentSplitterState);
214 connect(document, &Document::splitterChanged, this, &MainWindow::handleDocumentSplitterChange); 214 connect(document, &Document::splitterChanged, this, &MainWindow::handleDocumentSplitterChange);
215 connect(document, &Document::mouseClick, this, &MainWindow::canvasMouseReleased); 215 connect(document, &Document::mouseClick, this, &MainWindow::canvasMouseReleased);
216 connect(document, &Document::mouseMove, this, &MainWindow::canvasMouseMoved); 216 connect(document, &Document::mouseMove, this, &MainWindow::canvasMouseMoved);
217 document->setCanvasOverpaintCallback([&](Canvas* canvas, QPainter* painter)
218 {
219 if (this->selectedTool != nullptr)
220 {
221 this->selectedTool->overpaint(canvas, painter);
222 }
223 });
217 } 224 }
218 225
219 void MainWindow::runSettingsEditor() 226 void MainWindow::runSettingsEditor()
220 { 227 {
221 SettingsEditor settingsEditor{&this->settings, this->defaultKeyboardShortcuts, this}; 228 SettingsEditor settingsEditor{&this->settings, this->defaultKeyboardShortcuts, this};

mercurial