[qet] qet/qet: [5733] Free selection : minor |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5733
Author: blacksun
Date: 2019-02-04 21:43:58 +0100 (Mon, 04 Feb 2019)
Log Message:
-----------
Free selection : minor
Modified Paths:
--------------
trunk/sources/diagramview.cpp
Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp 2019-02-04 19:00:46 UTC (rev 5732)
+++ trunk/sources/diagramview.cpp 2019-02-04 20:43:58 UTC (rev 5733)
@@ -540,18 +540,21 @@
}
}
- //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();