+ fixes #0001354: Crash on using Enter-Key for confirmation of chamfer or fillet entries
This commit is contained in:
parent
e036460635
commit
ef08a61a4d
|
@ -25,6 +25,7 @@
|
|||
|
||||
#ifndef _PreComp_
|
||||
# include <boost/bind.hpp>
|
||||
# include <QCursor>
|
||||
#endif
|
||||
|
||||
#include "TaskView.h"
|
||||
|
@ -274,8 +275,17 @@ void TaskView::keyPressEvent(QKeyEvent* ke)
|
|||
for (int i=0; i<list.size(); ++i) {
|
||||
QPushButton *pb = list.at(i);
|
||||
if (pb->isDefault() && pb->isVisible()) {
|
||||
if (pb->isEnabled())
|
||||
if (pb->isEnabled()) {
|
||||
#if defined(FC_OS_MACOSX)
|
||||
// #0001354: Crash on using Enter-Key for confirmation of chamfer or fillet entries
|
||||
QPoint pos = QCursor::pos();
|
||||
QCursor::setPos(pb->parentWidget()->mapToGlobal(pb->pos()));
|
||||
#endif
|
||||
pb->click();
|
||||
#if defined(FC_OS_MACOSX)
|
||||
QCursor::setPos(pos);
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -287,8 +297,17 @@ void TaskView::keyPressEvent(QKeyEvent* ke)
|
|||
for (int i=0; i<list.size(); ++i) {
|
||||
QAbstractButton *pb = list.at(i);
|
||||
if (box->buttonRole(pb) == QDialogButtonBox::RejectRole) {
|
||||
if (pb->isEnabled())
|
||||
if (pb->isEnabled()) {
|
||||
#if defined(FC_OS_MACOSX)
|
||||
// #0001354: Crash on using Enter-Key for confirmation of chamfer or fillet entries
|
||||
QPoint pos = QCursor::pos();
|
||||
QCursor::setPos(pb->parentWidget()->mapToGlobal(pb->pos()));
|
||||
#endif
|
||||
pb->click();
|
||||
#if defined(FC_OS_MACOSX)
|
||||
QCursor::setPos(pos);
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user