[qet] qet/qet: [5806] Minor : remove unused variable |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5806
Author: blacksun
Date: 2019-03-21 20:42:16 +0100 (Thu, 21 Mar 2019)
Log Message:
-----------
Minor : remove unused variable
Modified Paths:
--------------
trunk/sources/diagram.h
trunk/sources/diagramcommands.cpp
trunk/sources/diagramview.cpp
Modified: trunk/sources/diagram.h
===================================================================
--- trunk/sources/diagram.h 2019-03-20 20:38:58 UTC (rev 5805)
+++ trunk/sources/diagram.h 2019-03-21 19:42:16 UTC (rev 5806)
@@ -97,7 +97,6 @@
QHash <QString, QStringList> m_cnd_unitfolio_max;
QHash <QString, QStringList> m_cnd_tenfolio_max;
QHash <QString, QStringList> m_cnd_hundredfolio_max;
- bool item_paste;
private:
QGraphicsLineItem *conductor_setter_;
Modified: trunk/sources/diagramcommands.cpp
===================================================================
--- trunk/sources/diagramcommands.cpp 2019-03-20 20:38:58 UTC (rev 5805)
+++ trunk/sources/diagramcommands.cpp 2019-03-21 19:42:16 UTC (rev 5806)
@@ -124,11 +124,8 @@
else
{
const QList <QGraphicsItem *> qgis_list = content.items(filter);
- for (QGraphicsItem *item : qgis_list)
- {
- diagram->item_paste = true;
+ for (QGraphicsItem *item : qgis_list) {
diagram->addItem(item);
- diagram->item_paste = false;
}
}
Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp 2019-03-20 20:38:58 UTC (rev 5805)
+++ trunk/sources/diagramview.cpp 2019-03-21 19:42:16 UTC (rev 5806)
@@ -358,11 +358,11 @@
}
/**
- Importe les elements contenus dans le presse-papier dans le schema
- @param pos coin superieur gauche (en coordonnees de la scene) du rectangle
- englobant le contenu colle
- @param clipboard_mode Type de presse-papier a prendre en compte
-*/
+ * @brief DiagramView::paste
+ * Import the element stored in the clipboard to the diagram.
+ * @param pos : top left corner of the bounding rect of imported elements
+ * @param clipboard_mode
+ */
void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
if (!isInteractive() || m_diagram -> isReadOnly()) return;
@@ -372,18 +372,16 @@
QDomDocument document_xml;
if (!document_xml.setContent(texte_presse_papier)) return;
- // objet pour recuperer le contenu ajoute au schema par le coller
DiagramContent content_pasted;
- this->diagram()->item_paste = true;
- m_diagram -> fromXml(document_xml, pos, false, &content_pasted);
+ m_diagram->fromXml(document_xml, pos, false, &content_pasted);
- // si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
- if (content_pasted.count()) {
+ //If something was really added to diagram, we create an undo object.
+ if (content_pasted.count())
+ {
m_diagram -> clearSelection();
m_diagram -> undoStack().push(new PasteDiagramCommand(m_diagram, content_pasted));
adjustSceneRect();
}
- this->diagram()->item_paste = false;
}
/**