Commit 2a1f5639 authored by Joachim Eibl's avatar Joachim Eibl

Fix for tab-key moving focus instead of adding a tab character in MergeResultWindow.

git-svn-id: https://kdiff3.svn.sourceforge.net/svnroot/kdiff3/trunk@147 c8aa9fed-2811-0410-8543-893ada326672
parent 72ed2c72
......@@ -2166,7 +2166,20 @@ void MergeResultWindow::wheelEvent( QWheelEvent* e )
scroll( 0, min2(d, getNofVisibleLines()) );
}
bool MergeResultWindow::event( QEvent* e )
{
if ( e->type()==QEvent::KeyPress )
{
QKeyEvent *ke = static_cast<QKeyEvent *>(e);
if (ke->key() == Qt::Key_Tab)
{
// special tab handling here to avoid moving focus
keyPressEvent( ke );
return true;
}
}
return QWidget::event(e);
}
void MergeResultWindow::keyPressEvent( QKeyEvent* e )
{
int y = m_cursorYPos;
......
......@@ -377,6 +377,7 @@ private:
);
void setFastSelector(MergeLineList::iterator i);
void convertToLinePos( int x, int y, int& line, int& pos );
bool event(QEvent*);
virtual void mousePressEvent ( QMouseEvent* e );
virtual void mouseDoubleClickEvent ( QMouseEvent* e );
virtual void mouseReleaseEvent ( QMouseEvent * );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment