diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/xml/repr-sorting.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/xml/repr-sorting.cpp')
| -rw-r--r-- | src/xml/repr-sorting.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xml/repr-sorting.cpp b/src/xml/repr-sorting.cpp index 056236d33..09a39acb2 100644 --- a/src/xml/repr-sorting.cpp +++ b/src/xml/repr-sorting.cpp @@ -2,6 +2,7 @@ #include "util/longest-common-suffix.h" #include "xml/repr.h" #include "xml/node-iterators.h" +#include "repr-sorting.h" static bool same_repr(Inkscape::XML::Node const &a, Inkscape::XML::Node const &b) { @@ -13,9 +14,14 @@ Inkscape::XML::Node const *LCA(Inkscape::XML::Node const *a, Inkscape::XML::Node { using Inkscape::Algorithms::longest_common_suffix; Inkscape::XML::Node const *ancestor = longest_common_suffix<Inkscape::XML::NodeConstParentIterator>( - a, b, NULL, &same_repr - ); - if ( ancestor && ancestor->type() != Inkscape::XML::DOCUMENT_NODE ) { + a, b, NULL, &same_repr); + bool OK = false; + if (ancestor) { + if (ancestor->type() != Inkscape::XML::DOCUMENT_NODE) { + OK = true; + } + } + if ( OK ) { return ancestor; } else { return NULL; |
