mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-22 06:14:14 +02:00
Fix the following issues:
a) paste - conductor does not move - pressing escape does not abort - pressing anything during the process crashes the program instead of aborting b) similar issue with the escape not working fixed for graphics items, texxt fields (and probably others)
This commit is contained in:
@@ -733,6 +733,10 @@ void DiagramView::keyPressEvent(QKeyEvent *e)
|
||||
//way off the canvas for someone working without a mouse.
|
||||
//Escape steps back out: first it drops the selection, then it
|
||||
//hands focus to the next widget.
|
||||
if (m_diagram && m_diagram->hasEventInterface()) {
|
||||
QGraphicsView::keyPressEvent(e); // let the active tool see it
|
||||
return;
|
||||
}
|
||||
if (m_diagram && !m_diagram->selectedItems().isEmpty()) {
|
||||
m_diagram->clearSelection();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user