From: mental Date: Tue, 1 Jul 2008 23:08:26 +0000 (+0000) Subject: fix inkboard node position bugs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=497b8c236fdad6c8df5850b4373a49f8d4e7d592;p=inkscape.git fix inkboard node position bugs --- diff --git a/src/jabber_whiteboard/inkboard-document.cpp b/src/jabber_whiteboard/inkboard-document.cpp index 3e36d5c84..4b27d530a 100644 --- a/src/jabber_whiteboard/inkboard-document.cpp +++ b/src/jabber_whiteboard/inkboard-document.cpp @@ -410,13 +410,10 @@ void InkboardDocument::notifyChildOrderChanged(XML::Node &parent, { if (_in_transaction && state == State::IN_WHITEBOARD) { - XML::Node *element = (XML::Node *)&child; - XML::Node *parentElement = (XML::Node *)&parent; - - unsigned int index = parentElement->_childPosition(*element); + unsigned int index = child.position(); Message::Message message = String::ucompose(Vars::MOVE_MESSAGE, - tracker->get(element),index); + tracker->get(&child),index); send(getRecipient(),Message::MOVE,message); } diff --git a/src/jabber_whiteboard/inkboard-node.cpp b/src/jabber_whiteboard/inkboard-node.cpp index e6eee7304..f84053b65 100644 --- a/src/jabber_whiteboard/inkboard-node.cpp +++ b/src/jabber_whiteboard/inkboard-node.cpp @@ -43,7 +43,6 @@ InkboardDocument::composeNewMessage(Inkscape::XML::Node *node) { Glib::ustring parentKey; Glib::ustring key = this->tracker->get(node); - Inkscape::XML::Node *parent = node->parent(); Glib::ustring tempParentKey = this->tracker->get(node->parent()); if(tempParentKey.size() < 1) @@ -51,7 +50,7 @@ InkboardDocument::composeNewMessage(Inkscape::XML::Node *node) else parentKey = tempParentKey; - unsigned int index = parent->_childPosition(*node); + unsigned int index = node->position(); Message::Message nodeMessage = MessageUtilities::objectToString(node); Message::Message message = String::ucompose(Vars::NEW_MESSAGE,parentKey,key,index,0,nodeMessage);