mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
replace if/else with switch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13974 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2d73110e2c
commit
98a75b6456
@ -103,24 +103,30 @@ void InsertTableWidget::mouseMoveEvent(QMouseEvent * event)
|
||||
|
||||
bool InsertTableWidget::event(QEvent * event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseMove) {
|
||||
switch (event->type()) {
|
||||
case QEvent::MouseMove: {
|
||||
QMouseEvent * me = dynamic_cast<QMouseEvent *>(event);
|
||||
mouseMoveEvent(me);
|
||||
return true;
|
||||
} else if (event->type() == QEvent::MouseButtonRelease) {
|
||||
}
|
||||
case QEvent::MouseButtonRelease: {
|
||||
QMouseEvent * me = dynamic_cast<QMouseEvent *>(event);
|
||||
mouseReleaseEvent(me);
|
||||
return true;
|
||||
} else if (event->type() == QEvent::MouseButtonPress) {
|
||||
}
|
||||
case QEvent::MouseButtonPress: {
|
||||
// swallow this one...
|
||||
return true;
|
||||
} else if (event->type() == QEvent::Leave) {
|
||||
}
|
||||
case QEvent::Leave: {
|
||||
bottom_ = 0;
|
||||
right_ = 0;
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return QWidget::event(event);
|
||||
}
|
||||
return QWidget::event(event);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user