@@ -437,7 +437,7 @@ def setData(self, index, value, role=QtCore.Qt.EditRole, update=True):
437437 return False
438438
439439 def insertRows (self , position , rows = 1 , index = QtCore .QModelIndex (),
440- waypoints = None , hexagonCreated = False ):
440+ waypoints = None , hexagonCreated = False , data_copied = False ):
441441 """
442442 Insert waypoint; overrides the corresponding QAbstractTableModel
443443 method.
@@ -447,7 +447,11 @@ def insertRows(self, position, rows=1, index=QtCore.QModelIndex(),
447447
448448 assert len (waypoints ) == rows , (waypoints , rows )
449449
450- savedChangeMessage = "Hexagon created." if hexagonCreated else ("Inserted a new waypoint." )
450+ savedChangeMessage = "Inserted a new waypoint."
451+ if hexagonCreated :
452+ savedChangeMessage = "Hexagon created."
453+ elif data_copied :
454+ savedChangeMessage = "Imported from another flight track"
451455 self .changeMessageSignal .emit (savedChangeMessage )
452456
453457 self .beginInsertRows (QtCore .QModelIndex (), position ,
@@ -609,7 +613,7 @@ def invert_direction(self):
609613
610614 def replace_waypoints (self , new_waypoints ):
611615 self .waypoints = []
612- self .insertRows (0 , rows = len (new_waypoints ), waypoints = new_waypoints )
616+ self .insertRows (0 , rows = len (new_waypoints ), waypoints = new_waypoints , data_copied = True )
613617
614618 def save_to_ftml (self , filename = None ):
615619 """
0 commit comments