mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
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:
@@ -97,7 +97,6 @@ class Diagram : public QGraphicsScene
|
|||||||
QHash <QString, QStringList> m_cnd_unitfolio_max;
|
QHash <QString, QStringList> m_cnd_unitfolio_max;
|
||||||
QHash <QString, QStringList> m_cnd_tenfolio_max;
|
QHash <QString, QStringList> m_cnd_tenfolio_max;
|
||||||
QHash <QString, QStringList> m_cnd_hundredfolio_max;
|
QHash <QString, QStringList> m_cnd_hundredfolio_max;
|
||||||
bool item_paste;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsLineItem *conductor_setter_;
|
QGraphicsLineItem *conductor_setter_;
|
||||||
|
|||||||
@@ -124,11 +124,8 @@ void PasteDiagramCommand::redo()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QList <QGraphicsItem *> qgis_list = content.items(filter);
|
const QList <QGraphicsItem *> qgis_list = content.items(filter);
|
||||||
for (QGraphicsItem *item : qgis_list)
|
for (QGraphicsItem *item : qgis_list) {
|
||||||
{
|
|
||||||
diagram->item_paste = true;
|
|
||||||
diagram->addItem(item);
|
diagram->addItem(item);
|
||||||
diagram->item_paste = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -358,10 +358,10 @@ void DiagramView::copy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Importe les elements contenus dans le presse-papier dans le schema
|
* @brief DiagramView::paste
|
||||||
@param pos coin superieur gauche (en coordonnees de la scene) du rectangle
|
* Import the element stored in the clipboard to the diagram.
|
||||||
englobant le contenu colle
|
* @param pos : top left corner of the bounding rect of imported elements
|
||||||
@param clipboard_mode Type de presse-papier a prendre en compte
|
* @param clipboard_mode
|
||||||
*/
|
*/
|
||||||
void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
||||||
if (!isInteractive() || m_diagram -> isReadOnly()) return;
|
if (!isInteractive() || m_diagram -> isReadOnly()) return;
|
||||||
@@ -372,18 +372,16 @@ void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
|||||||
QDomDocument document_xml;
|
QDomDocument document_xml;
|
||||||
if (!document_xml.setContent(texte_presse_papier)) return;
|
if (!document_xml.setContent(texte_presse_papier)) return;
|
||||||
|
|
||||||
// objet pour recuperer le contenu ajoute au schema par le coller
|
|
||||||
DiagramContent content_pasted;
|
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 something was really added to diagram, we create an undo object.
|
||||||
if (content_pasted.count()) {
|
if (content_pasted.count())
|
||||||
|
{
|
||||||
m_diagram -> clearSelection();
|
m_diagram -> clearSelection();
|
||||||
m_diagram -> undoStack().push(new PasteDiagramCommand(m_diagram, content_pasted));
|
m_diagram -> undoStack().push(new PasteDiagramCommand(m_diagram, content_pasted));
|
||||||
adjustSceneRect();
|
adjustSceneRect();
|
||||||
}
|
}
|
||||||
this->diagram()->item_paste = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user