summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-03-02 22:01:12 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-03-02 22:01:12 +0000
commit017e93e3dae0be363c6b9caf71d68dc4d1055bc9 (patch)
tree70d3afe3e23ab28effaa8f94c1c977e2a7c2aa11 /src/desktop.cpp
parent* [INTL: sk] (trunk) Updated Slovak translation (diff)
downloadinkscape-017e93e3dae0be363c6b9caf71d68dc4d1055bc9.tar.gz
inkscape-017e93e3dae0be363c6b9caf71d68dc4d1055bc9.zip
remove flashing test indicator on pointparam.
remove some leftover code from point param code remove test pointparam from LPEKnot added SnapIndicator added SnapIndicator to SPDesktop, and a call from guidesnapping to display a snapindicator when a guide is snapped. fix canvas-temporary-item-list.cpp (bzr r4931)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 65025027a..3ff4bf2f5 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -78,6 +78,7 @@
#include "display/sodipodi-ctrlrect.h"
#include "display/sp-canvas-util.h"
#include "display/canvas-temporary-item-list.h"
+#include "display/snap-indicator.h"
#include "libnr/nr-matrix-div.h"
#include "libnr/nr-rect-ops.h"
#include "ui/dialog/dialog-manager.h"
@@ -117,6 +118,7 @@ SPDesktop::SPDesktop() :
layer_manager( 0 ),
event_log( 0 ),
temporary_item_list( 0 ),
+ snapindicator( 0 ),
acetate( 0 ),
main( 0 ),
gridgroup( 0 ),
@@ -316,13 +318,20 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
showGrids(namedview->grids_visible, false);
temporary_item_list = new Inkscape::Display::TemporaryItemList( this );
+ snapindicator = new Inkscape::Display::SnapIndicator ( this );
}
void SPDesktop::destroy()
{
- delete temporary_item_list;
- temporary_item_list = NULL;
+ if (snapindicator) {
+ delete snapindicator;
+ snapindicator = NULL;
+ }
+ if (temporary_item_list) {
+ delete temporary_item_list;
+ temporary_item_list = NULL;
+ }
namedview->hide(this);
@@ -393,7 +402,10 @@ SPDesktop::add_temporary_canvasitem (SPCanvasItem *item, guint lifetime)
void
SPDesktop::remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem)
{
- temporary_item_list->delete_item(tempitem);
+ // check for non-null temporary_item_list, because during destruction of desktop, some destructor might try to access this list!
+ if (tempitem && temporary_item_list) {
+ temporary_item_list->delete_item(tempitem);
+ }
}
void SPDesktop::setDisplayModeNormal()