mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +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
|
||||
//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_]()
|
||||
if (m_free_rubberband.count() > 3)
|
||||
{
|
||||
ConductorCreator::create(m_diagram, polygon_);
|
||||
diagram()->clearSelection();
|
||||
});
|
||||
QMenu *menu = new QMenu(this);
|
||||
menu->addAction(act);
|
||||
menu->popup(e->globalPos());
|
||||
//Popup a menu with an action to create conductors between
|
||||
//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_);
|
||||
diagram()->clearSelection();
|
||||
});
|
||||
QMenu *menu = new QMenu(this);
|
||||
menu->addAction(act);
|
||||
menu->popup(e->globalPos());
|
||||
}
|
||||
|
||||
m_free_rubberbanding = false;
|
||||
m_free_rubberband = QPolygon();
|
||||
|
||||
Reference in New Issue
Block a user