summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-02-28 18:36:08 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-02-28 18:36:08 +0000
commit5974e91ff387b44b30434d3a2ede5f1ea6791a7c (patch)
tree93c062f10f51d6ea670d716d49b5c5883181e055 /src/ui/dialog
parentupdate to trunk (diff)
parentSpray tool: (diff)
downloadinkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.tar.gz
inkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.zip
update to trunk
(bzr r11950.1.259)
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/swatches.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index 3f161ad28..807618b4d 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -746,7 +746,7 @@ class DocTrack
{
public:
DocTrack(SPDocument *doc, sigc::connection &gradientRsrcChanged, sigc::connection &defsChanged, sigc::connection &defsModified) :
- doc(doc),
+ doc(doc->doRef()),
updatePending(false),
lastGradientUpdate(0.0),
gradientRsrcChanged(gradientRsrcChanged),
@@ -776,6 +776,8 @@ public:
gradientRsrcChanged.disconnect();
defsChanged.disconnect();
defsModified.disconnect();
+ doc->doUnref();
+ doc = NULL;
}
}
@@ -858,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) {
@@ -867,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);
@@ -905,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 )