Minor : remove unused variable

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5806 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-03-21 19:42:16 +00:00
parent 69dfb598d3
commit 660c7493c0
3 changed files with 10 additions and 16 deletions

View File

@@ -97,7 +97,6 @@ class Diagram : public QGraphicsScene
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_;

View File

@@ -124,11 +124,8 @@ void PasteDiagramCommand::redo()
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;
}
}

View File

@@ -358,10 +358,10 @@ void DiagramView::copy() {
}
/**
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 @@ void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
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);
// 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;
}
/**