mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix the cursor problem on the TagWidget
The problem was the Focus Prevention system on the EventFilter. Instead of that we can pass the setFocusPolicy ( strongFocus ) that ignores the mousewheel. simpler and cleaner. Fixes #376 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
890d60ff9e
commit
29a19e2e84
1 changed files with 1 additions and 6 deletions
|
@ -31,6 +31,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
editMode(NONE)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui.tagWidget->setFocusPolicy(Qt::StrongFocus); // Don't get focus by 'Wheel'
|
||||
ui.cylinders->setModel(cylindersModel);
|
||||
ui.weights->setModel(weightModel);
|
||||
closeMessage();
|
||||
|
@ -286,12 +287,6 @@ bool MainTab::eventFilter(QObject* object, QEvent* event)
|
|||
|
||||
if (editMode != NONE)
|
||||
return false;
|
||||
// we want to prevent the user from accidentally enabling editMode:
|
||||
// for the tagWidget we ignore FocusIn - that's both a click and starting the scroll wheel
|
||||
// this means a click by itself won't start edit mode - but typing something will
|
||||
if (object->objectName() == "tagWidget" &&
|
||||
event->type() == QEvent::FocusIn)
|
||||
return true;
|
||||
// for the dateTimeEdit widget we need to ignore Wheel events as well (as long as we aren't editing)
|
||||
if (object->objectName() == "dateTimeEdit" &&
|
||||
(event->type() == QEvent::FocusIn || event->type() == QEvent::Wheel))
|
||||
|
|
Loading…
Add table
Reference in a new issue