mirror of https://gitlab.com/pamhyr/pamhyr2
Network: Fix 'previous_item' c++ object deleted.
parent
0f0a08dcbf
commit
9c8af7b0a7
|
|
@ -17,6 +17,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import math
|
||||
import logging
|
||||
|
||||
from tools import timer
|
||||
|
||||
|
|
@ -39,6 +40,8 @@ from Model.Network.Graph import Graph
|
|||
|
||||
from View.Network.UndoCommand import *
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
|
||||
|
|
@ -571,6 +574,7 @@ class GraphWidget(QGraphicsView):
|
|||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
try:
|
||||
previous_item = self._selected_item
|
||||
self._selected_item = item
|
||||
|
||||
|
|
@ -579,6 +583,8 @@ class GraphWidget(QGraphicsView):
|
|||
|
||||
if item:
|
||||
item.update()
|
||||
except Exception as e:
|
||||
logger.debug(str(e))
|
||||
|
||||
def selected_new_edge_src_node(self):
|
||||
"""The current node item selected to add new edge
|
||||
|
|
|
|||
Loading…
Reference in New Issue