Showing
4 changed files
with
5 additions
and
1 deletions
... | @@ -266,6 +266,8 @@ void GraphItem::path_highlighting(std::string start, std::string end) | ... | @@ -266,6 +266,8 @@ void GraphItem::path_highlighting(std::string start, std::string end) |
266 | n->setColor(QColor(255, 0, 0)); | 266 | n->setColor(QColor(255, 0, 0)); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | + | ||
270 | + | ||
269 | } | 271 | } |
270 | 272 | ||
271 | //event handler | 273 | //event handler | ... | ... |
... | @@ -40,4 +40,5 @@ void MainWindow::test_func() | ... | @@ -40,4 +40,5 @@ void MainWindow::test_func() |
40 | /*QMessageBox::information(this, "test", | 40 | /*QMessageBox::information(this, "test", |
41 | "test: "+QString::number(11));*/ | 41 | "test: "+QString::number(11));*/ |
42 | graphWidget->path_highlight(); | 42 | graphWidget->path_highlight(); |
43 | + //graphWidget->update(); | ||
43 | } | 44 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -45,6 +45,7 @@ void PaperGraphWidget::print_graph(ifstream& fin) | ... | @@ -45,6 +45,7 @@ void PaperGraphWidget::print_graph(ifstream& fin) |
45 | void PaperGraphWidget::path_highlight() | 45 | void PaperGraphWidget::path_highlight() |
46 | { | 46 | { |
47 | graphItem->path_highlighting(std::string(""), std::string("")); | 47 | graphItem->path_highlighting(std::string(""), std::string("")); |
48 | + scene->update(); | ||
48 | } | 49 | } |
49 | 50 | ||
50 | void PaperGraphWidget::handleSelectionChanged(int idx) | 51 | void PaperGraphWidget::handleSelectionChanged(int idx) | ... | ... |
... | @@ -27,7 +27,7 @@ private: | ... | @@ -27,7 +27,7 @@ private: |
27 | 27 | ||
28 | //Ui::PaperGraphWidgetClass ui; | 28 | //Ui::PaperGraphWidgetClass ui; |
29 | QGraphicsScene *scene; | 29 | QGraphicsScene *scene; |
30 | - GraphItem *graphItem; | 30 | + GraphItem *graphItem = nullptr; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | #endif // PAPERGRAPHWIDGET_H | 33 | #endif // PAPERGRAPHWIDGET_H | ... | ... |
-
Please register or login to post a comment