Skip to content

Commit

Permalink
ISSUE-5503: Focus set proper when changing the shape that we are acti…
Browse files Browse the repository at this point in the history
…vly drawing
  • Loading branch information
JKRT authored and adeas31 committed May 27, 2019
1 parent a7237c2 commit 04b5e7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions OMEdit/OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -2676,6 +2676,7 @@ void MainWindow::openAboutOMEdit()

void MainWindow::toggleShapesButton()
{
setFocus();
QAction *clickedAction = qobject_cast<QAction*>(const_cast<QObject*>(sender()));
QList<QAction*> shapeActions = mpShapesActionGroup->actions();
foreach (QAction *shapeAction, shapeActions) {
Expand Down
4 changes: 4 additions & 0 deletions OMEdit/OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -2914,6 +2914,10 @@ void GraphicsView::focusOutEvent(QFocusEvent *event)
if (QApplication::overrideCursor() && QApplication::overrideCursor()->shape() == Qt::CrossCursor) {
QApplication::restoreOverrideCursor();
}
/*If we get a focus out event while drawing. Stop drawing.*/
if (isCreatingShape()) {
finishDrawingGenericShape();
}
QGraphicsView::focusOutEvent(event);
}

Expand Down

0 comments on commit 04b5e7a

Please sign in to comment.