diff --git a/sources/editor/elementview.cpp b/sources/editor/elementview.cpp index 05fc6c41d..373639614 100644 --- a/sources/editor/elementview.cpp +++ b/sources/editor/elementview.cpp @@ -307,10 +307,12 @@ ElementContent ElementView::pasteAreaDefined(const QRectF &target_rect) { @param pos Coin superieur gauche du rectangle cible */ ElementContent ElementView::paste(const QDomDocument &xml_document, const QPointF &pos) { + // object to retrieve content added to the scheme by pasting // objet pour recuperer le contenu ajoute au schema par le coller ElementContent content_pasted; m_scene -> fromXml(xml_document, pos, false, &content_pasted); + // if something has actually been added to the scheme, an undo object is created // si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation if (content_pasted.count()) { m_scene -> clearSelection(); @@ -334,6 +336,7 @@ ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) { QRectF pasted_content_bounding_rect = m_scene -> boundingRectFromXml(xml_document); if (pasted_content_bounding_rect.isEmpty()) return(content_pasted); + // paste copied parts with offset // copier/coller avec decalage QRectF final_pasted_content_bounding_rect; ++ offset_paste_count_; @@ -594,10 +597,12 @@ void ElementView::drawBackground(QPainter *p, const QRectF &r) { @return */ QRectF ElementView::applyMovement(const QRectF &start, const QPointF &offset) { + // calculates the offset to be applied from the offset // calcule le decalage a appliquer a partir de l'offset QPointF final_offset; final_offset.rx() = start.width() + offset.x(); + // applies the calculated offset // applique le decalage ainsi calcule return(start.translated(final_offset)); }