Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / sp-canvas.cpp
index c6778c8c5ec56fe8dbe5f8472fb6a15827a35946..fc68bcfc00a3c6ac304033832b183ab925738eab 100644 (file)
@@ -1,5 +1,3 @@
-#define __SP_CANVAS_C__
-
 /** \file
  * Port of GnomeCanvas for Inkscape needs
  *
 
 #include "helper/sp-marshal.h"
 #include <helper/recthull.h>
-#include <display/sp-canvas.h>
-#include "display-forward.h"
+#include "display/sp-canvas.h"
+#include "display/sp-canvas-group.h"
 #include <2geom/matrix.h>
-#include <libnr/nr-convex-hull.h>
+#include "libnr/nr-convex-hull.h"
 #include "preferences.h"
 #include "inkscape.h"
 #include "sodipodi-ctrlrect.h"
@@ -1040,6 +1038,8 @@ sp_canvas_init (SPCanvas *canvas)
 
     // See comment at in sp-canvas.h.
     canvas->gen_all_enter_events = false;
+    
+    canvas->drawing_disabled = false;
 
     canvas->tiles=NULL;
     canvas->tLeft=canvas->tTop=canvas->tRight=canvas->tBottom=0;
@@ -2113,6 +2113,9 @@ do_update (SPCanvas *canvas)
 {
     if (!canvas->root || !canvas->pixmap_gc) // canvas may have already be destroyed by closing desktop during interrupted display!
         return TRUE;
+        
+    if (canvas->drawing_disabled)
+        return TRUE;
 
     /* Cause the update if necessary */
     if (canvas->need_update) {
@@ -2447,4 +2450,4 @@ void sp_canvas_mark_rect(SPCanvas* canvas, int nl, int nt, int nr, int nb, uint8
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :