diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-02-27 22:48:55 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-02-27 22:48:55 +0000 |
| commit | b368877bf540ce4b6b06581d1f6955b6ce37e248 (patch) | |
| tree | b9ed1b155d7bbe52ab1b387a911e5861cdf29c61 /src | |
| parent | swatches dialog: properly reference count the reference to SPDocument in time... (diff) | |
| download | inkscape-b368877bf540ce4b6b06581d1f6955b6ce37e248.tar.gz inkscape-b368877bf540ce4b6b06581d1f6955b6ce37e248.zip | |
swatches dialog: remove unused code part. cleanup some code
(bzr r13069)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/swatches.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 06b52e2e2..807618b4d 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -777,6 +777,7 @@ public: defsChanged.disconnect(); defsModified.disconnect(); doc->doUnref(); + doc = NULL; } } @@ -859,7 +860,7 @@ bool DocTrack::queueUpdateIfNeeded( SPDocument *doc ) void SwatchesPanel::_trackDocument( SwatchesPanel *panel, SPDocument *document ) { - SPDocument *oldDoc = 0; + SPDocument *oldDoc = NULL; if (docPerPanel.find(panel) != docPerPanel.end()) { oldDoc = docPerPanel[panel]; if (!oldDoc) { @@ -868,7 +869,7 @@ void SwatchesPanel::_trackDocument( SwatchesPanel *panel, SPDocument *document ) } if (oldDoc != document) { if (oldDoc) { - docPerPanel[panel] = 0; + docPerPanel[panel] = NULL; bool found = false; for (std::map<SwatchesPanel*, SPDocument*>::iterator it = docPerPanel.begin(); (it != docPerPanel.end()) && !found; ++it) { found = (it->second == document); @@ -906,11 +907,6 @@ void SwatchesPanel::_trackDocument( SwatchesPanel *panel, SPDocument *document ) } } } - - std::set<SPDocument*> docs; - for (std::map<SwatchesPanel*, SPDocument*>::iterator it = docPerPanel.begin(); it != docPerPanel.end(); ++it) { - docs.insert(it->second); - } } void SwatchesPanel::_setDocument( SPDocument *document ) |
