Fix crash on exit on Mac.

Fixes issue #2661
This commit is contained in:
John Maguire 2012-03-12 18:11:10 +01:00
parent 63ee8b2e55
commit d819c88ff8
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ ForceScrollPerPixel::ForceScrollPerPixel(QAbstractItemView* item_view, QObject*
}
bool ForceScrollPerPixel::eventFilter(QObject* object, QEvent* event) {
if (object == item_view_ && event->type() != QEvent::Destroy) {
if (object == item_view_ &&
event->type() != QEvent::Destroy &&
event->type() != QEvent::WinIdChange) {
item_view_->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
item_view_->verticalScrollBar()->setSingleStep(20);
}