@@ -84,16 +84,16 @@ def _redraw(self):
84
84
85
85
edge_pen = QPen (EDGE_COLOR , 2 )
86
86
for row , node in enumerate (self .graph .nodes ):
87
- if not node .parents :
87
+ if not node .parent_shas :
88
88
continue
89
- x0 = self ._lane_x (node .lane )
89
+ x0 = self ._lane_x (node .lane_index )
90
90
y0 = self ._row_y (row )
91
- for p in node .parents :
91
+ for p in node .parent_shas :
92
92
if p not in self .graph .index :
93
93
continue
94
94
prow = self .graph .index [p ]
95
95
parent_node = self .graph .nodes [prow ]
96
- x1 = self ._lane_x (parent_node .lane )
96
+ x1 = self ._lane_x (parent_node .lane_index )
97
97
y1 = self ._row_y (prow )
98
98
path = QPainterPath (QPointF (x0 , y0 ))
99
99
ctrl_y = (y0 + y1 ) / 2.0
@@ -103,20 +103,20 @@ def _redraw(self):
103
103
self ._scene .addItem (edge_item )
104
104
105
105
for row , node in enumerate (self .graph .nodes ):
106
- cx = self ._lane_x (node .lane )
106
+ cx = self ._lane_x (node .lane_index )
107
107
cy = self ._row_y (row )
108
108
109
109
circle = QGraphicsEllipseItem (
110
110
QRectF (cx - NODE_RADIUS , cy - NODE_RADIUS , NODE_RADIUS * 2 , NODE_RADIUS * 2 )
111
111
)
112
- circle .setBrush (QBrush (lane_color (node .lane )))
112
+ circle .setBrush (QBrush (lane_color (node .lane_index )))
113
113
circle .setPen (QPen (Qt .PenStyle .NoPen ))
114
114
circle .setToolTip (self .language_wrapper_get (
115
115
"git_graph_tooltip_commit"
116
- ).format (short = node .sha [:7 ],
117
- author = node .author ,
118
- date = node .date ,
119
- msg = node .message ))
116
+ ).format (short = node .commit_sha [:7 ],
117
+ author = node .author_name ,
118
+ date = node .commit_date ,
119
+ msg = node .commit_message ))
120
120
self ._scene .addItem (circle )
121
121
122
122
label_item = QGraphicsSimpleTextItem (str (row + 1 ))
@@ -126,7 +126,7 @@ def _redraw(self):
126
126
127
127
self ._scene .setSceneRect (
128
128
QRectF (- 40 , 0 ,
129
- self ._lane_x (max (n .lane for n in self .graph .nodes ) + 1 ) + self ._padding ,
129
+ self ._lane_x (max (n .lane_index for n in self .graph .nodes ) + 1 ) + self ._padding ,
130
130
self ._row_y (len (self .graph .nodes )) + self ._padding )
131
131
)
132
132
0 commit comments