OSDN Git Service

modified: src/padarea.c
[kp123/kp123.git] / src / padarea.c
index 185702f..f07e883 100644 (file)
@@ -195,10 +195,11 @@ static int kp_padarea_motion_cb(GtkWidget *w, GdkEventMotion *event, gpointer da
     if(self->instroke && state & GDK_BUTTON1_MASK)
     {
        GdkPoint *p0 = (GdkPoint *)g_list_last(self->curstroke)->data;
     if(self->instroke && state & GDK_BUTTON1_MASK)
     {
        GdkPoint *p0 = (GdkPoint *)g_list_last(self->curstroke)->data;
+       if((p0->x == x) && (p0->y == y))
+           return TRUE;
        GdkPoint *pt = g_new(GdkPoint, 1);
        pt->x = x;
        pt->y = y;
        GdkPoint *pt = g_new(GdkPoint, 1);
        pt->x = x;
        pt->y = y;
-
        kp_padarea_draw_line(self, p0, pt);
        self->curstroke = g_list_append(self->curstroke, pt);
     }
        kp_padarea_draw_line(self, p0, pt);
        self->curstroke = g_list_append(self->curstroke, pt);
     }