Skip to content
  • Martin Walch's avatar
    Fix warning "item has already been added to this scene" · 4b83d131
    Martin Walch authored
    When starting the game, exactly 8 identical warnings appear:
    
    > QGraphicsScene::addItem: item has already been added to this scene
    
    Their origin lies in the ScoreSprite constructor, which instantiates
    several QGraphicsTextItems, passing itself as parent. Afterwards each
    of them is explicitely added to the same scene as the ScoreSprite using
    scene->addItem. However, this is redundant because passing the
    ScoreSprite as parent already makes the new QGraphicsTextItems part of
    the same scene. Hence the warning.
    
    REVIEW:127869
    4b83d131