~ubuntu-branches/ubuntu/trusty/gimp/trusty

« back to all changes in this revision

Viewing changes to app/paint/gimppaintcore.c

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2009-08-14 09:57:17 UTC
  • mto: (1.1.21 upstream) (0.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: james.westby@ubuntu.com-20090814095717-37dh2xqy5t0rurpk
ImportĀ upstreamĀ versionĀ 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
479
479
gimp_paint_core_cancel (GimpPaintCore *core,
480
480
                        GimpDrawable  *drawable)
481
481
{
 
482
  gint x, y;
 
483
  gint width, height;
 
484
 
482
485
  g_return_if_fail (GIMP_IS_PAINT_CORE (core));
483
486
  g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
484
487
  g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
489
492
  if ((core->x2 == core->x1) || (core->y2 == core->y1))
490
493
    return;
491
494
 
492
 
  gimp_paint_core_copy_valid_tiles (core->undo_tiles,
493
 
                                    gimp_drawable_get_tiles (drawable),
494
 
                                    core->x1, core->y1,
495
 
                                    core->x2 - core->x1,
496
 
                                    core->y2 - core->y1);
 
495
  if (gimp_rectangle_intersect (core->x1, core->y1,
 
496
                                core->x2 - core->x1,
 
497
                                core->y2 - core->y1,
 
498
                                0, 0,
 
499
                                gimp_item_width  (GIMP_ITEM (drawable)),
 
500
                                gimp_item_height (GIMP_ITEM (drawable)),
 
501
                                &x, &y, &width, &height))
 
502
    {
 
503
      gimp_paint_core_copy_valid_tiles (core->undo_tiles,
 
504
                                        gimp_drawable_get_tiles (drawable),
 
505
                                        x, y, width, height);
 
506
    }
497
507
 
498
508
  tile_manager_unref (core->undo_tiles);
499
509
  core->undo_tiles = NULL;
504
514
      core->saved_proj_tiles = NULL;
505
515
    }
506
516
 
507
 
  gimp_drawable_update (drawable,
508
 
                        core->x1, core->y1,
509
 
                        core->x2 - core->x1, core->y2 - core->y1);
 
517
  gimp_drawable_update (drawable, x, y, width, height);
510
518
 
511
519
  gimp_viewable_preview_thaw (GIMP_VIEWABLE (drawable));
512
520
}