1
0
Fork 0

AbstractTableView : Replacing repaint() calls to update() which allows for Qt to do optimizations (i.e merging multiple paint events into one, see http://doc.qt.io/qt-4.8/qwidget.html#paintEvent ). This yields faster stepping in visually in the disassembly widget (tested on my high end pc)

This commit is contained in:
Herzeh 2015-12-23 15:31:14 +01:00
parent 7171334e1a
commit 3a89a56377
1 changed files with 6 additions and 6 deletions

View File

@ -282,7 +282,7 @@ void AbstractTableView::mouseMoveEvent(QMouseEvent* event)
int wNewSize = getColumnWidth(mColResizeData.index) + delta;
setColumnWidth(mColResizeData.index, wNewSize);
mColResizeData.lastPosX = event->x();
repaint();
update();
}
}
break;
@ -300,7 +300,7 @@ void AbstractTableView::mouseMoveEvent(QMouseEvent* event)
mColumnList[mHeader.activeButtonIndex].header.isMouseOver = false;
}
repaint();
update();
}
break;
@ -355,7 +355,7 @@ void AbstractTableView::mousePressEvent(QMouseEvent* event)
mGuiState = AbstractTableView::HeaderButtonPressed;
repaint();
update();
}
}
@ -399,7 +399,7 @@ void AbstractTableView::mouseReleaseEvent(QMouseEvent* event)
mColumnList[i].header.isPressed = false;
}
repaint();
update();
}
}
@ -994,13 +994,13 @@ void AbstractTableView::reloadData()
{
mShouldReload = true;
emit tableOffsetChanged(mTableOffset);
repaint();
update();
}
void AbstractTableView::repaint()
{
this->viewport()->repaint();
this->viewport()->update();
}