src: Fixed crash when using shortcuts with focus on the graph (issue #390)
bug id = 390
This commit is contained in:
@@ -195,7 +195,7 @@ void QtGraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
void QtGraphicsView::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() >= Qt::Key_A && event->key() <= Qt::Key_Z)
|
||||
if (event->key() >= Qt::Key_A && event->key() <= Qt::Key_Z && event->text().size())
|
||||
{
|
||||
QChar c = event->text().at(0).toUpper();
|
||||
emit characterKeyPressed(c);
|
||||
|
||||
@@ -78,7 +78,7 @@ protected:
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void contextMenuEvent(QContextMenuEvent* event);
|
||||
void closeEvent(QCloseEvent* event);
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
|
||||
public slots:
|
||||
void about();
|
||||
|
||||
Reference in New Issue
Block a user