조성현

init graph as null

......@@ -266,6 +266,8 @@ void GraphItem::path_highlighting(std::string start, std::string end)
n->setColor(QColor(255, 0, 0));
}
}
}
//event handler
......
......@@ -40,4 +40,5 @@ void MainWindow::test_func()
/*QMessageBox::information(this, "test",
"test: "+QString::number(11));*/
graphWidget->path_highlight();
//graphWidget->update();
}
\ No newline at end of file
......
......@@ -45,6 +45,7 @@ void PaperGraphWidget::print_graph(ifstream& fin)
void PaperGraphWidget::path_highlight()
{
graphItem->path_highlighting(std::string(""), std::string(""));
scene->update();
}
void PaperGraphWidget::handleSelectionChanged(int idx)
......
......@@ -27,7 +27,7 @@ private:
//Ui::PaperGraphWidgetClass ui;
QGraphicsScene *scene;
GraphItem *graphItem;
GraphItem *graphItem = nullptr;
};
#endif // PAPERGRAPHWIDGET_H
......