Kaydet (Commit) b02216b1 authored tarafından Miklos Vajna's avatar Miklos Vajna

lokdocview: return early in lcl_signalMotion()

Change-Id: Ibf9d62c52edeaad4aada7960820e1bb8fa6c2c63
üst b2355ed7
......@@ -70,6 +70,7 @@ void lcl_getDragPoint(GdkRectangle* pHandle, GdkEventButton* pEvent, GdkPoint* p
gboolean lcl_signalMotion(GtkWidget* pEventBox, GdkEventButton* pEvent, LOKDocView* pDocView)
{
GdkPoint aPoint;
int i;
(void)pEventBox;
if (pDocView->m_bInDragMiddleHandle)
......@@ -79,31 +80,32 @@ gboolean lcl_signalMotion(GtkWidget* pEventBox, GdkEventButton* pEvent, LOKDocVi
pDocView->pDocument->pClass->setTextSelection(
pDocView->pDocument, LOK_SETTEXTSELECTION_RESET,
pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom);
return FALSE;
}
else if (pDocView->m_bInDragStartHandle)
if (pDocView->m_bInDragStartHandle)
{
g_info("lcl_signalMotion: dragging the start handle");
lcl_getDragPoint(&pDocView->m_aHandleStartRect, pEvent, &aPoint);
pDocView->pDocument->pClass->setTextSelection(
pDocView->pDocument, LOK_SETTEXTSELECTION_START,
pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom);
return FALSE;
}
else if (pDocView->m_bInDragEndHandle)
if (pDocView->m_bInDragEndHandle)
{
g_info("lcl_signalMotion: dragging the end handle");
lcl_getDragPoint(&pDocView->m_aHandleEndRect, pEvent, &aPoint);
pDocView->pDocument->pClass->setTextSelection(
pDocView->pDocument, LOK_SETTEXTSELECTION_END,
pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom);
return FALSE;
}
else
for (i = 0; i < GRAPHIC_HANDLE_COUNT; ++i)
{
int i;
for (i = 0; i < GRAPHIC_HANDLE_COUNT; ++i)
if (pDocView->m_bInDragGraphicHandles[i])
{
if (pDocView->m_bInDragGraphicHandles[i])
g_info("lcl_signalButton: dragging the graphic handle #%d", i);
g_info("lcl_signalButton: dragging the graphic handle #%d", i);
return FALSE;
}
}
return FALSE;
......
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