mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Free selection : minor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5733 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -540,18 +540,21 @@ void DiagramView::mouseReleaseEvent(QMouseEvent *e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Popup a menu with an action to create conductors between
|
if (m_free_rubberband.count() > 3)
|
||||||
//all selected terminals.
|
|
||||||
QAction *act = new QAction(tr("Connecter les bornes sélectionné"), this);
|
|
||||||
QPolygonF polygon_ = m_free_rubberband;
|
|
||||||
connect(act, &QAction::triggered, [this, polygon_]()
|
|
||||||
{
|
{
|
||||||
ConductorCreator::create(m_diagram, polygon_);
|
//Popup a menu with an action to create conductors between
|
||||||
diagram()->clearSelection();
|
//all selected terminals.
|
||||||
});
|
QAction *act = new QAction(tr("Connecter les bornes sélectionné"), this);
|
||||||
QMenu *menu = new QMenu(this);
|
QPolygonF polygon_ = m_free_rubberband;
|
||||||
menu->addAction(act);
|
connect(act, &QAction::triggered, [this, polygon_]()
|
||||||
menu->popup(e->globalPos());
|
{
|
||||||
|
ConductorCreator::create(m_diagram, polygon_);
|
||||||
|
diagram()->clearSelection();
|
||||||
|
});
|
||||||
|
QMenu *menu = new QMenu(this);
|
||||||
|
menu->addAction(act);
|
||||||
|
menu->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
|
||||||
m_free_rubberbanding = false;
|
m_free_rubberbanding = false;
|
||||||
m_free_rubberband = QPolygon();
|
m_free_rubberband = QPolygon();
|
||||||
|
|||||||
Reference in New Issue
Block a user