index 8109ef5f5ddcf62cca8dcebc8a9a0f2197b142e1..681b1dbbc3bc7a4bec9cb67f8fe7bf17a0339ed7 100644 (file)
--- a/src/ui/widget/ruler.cpp
+++ b/src/ui/widget/ruler.cpp
* Released under GNU GPL, read the file 'COPYING' for more information
*/
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <glibmm/i18n.h>
#include <gtkmm/ruler.h>
#include <glibmm/i18n.h>
#include <gtkmm/ruler.h>
#include "desktop-handles.h"
#include "document.h"
#include "sp-namedview.h"
#include "desktop-handles.h"
#include "document.h"
#include "sp-namedview.h"
+#include "verbs.h"
namespace Inkscape {
namespace UI {
namespace Inkscape {
namespace UI {
_dragging = false;
if ( (_horiz_f ? wy : wx ) >= 0 ) {
_dragging = false;
if ( (_horiz_f ? wy : wx ) >= 0 ) {
- Inkscape::XML::Node *repr = sp_repr_new("sodipodi:guide");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(_dt->doc());
+ Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
repr->setAttribute("orientation", _horiz_f ? "horizontal" : "vertical");
double const guide_pos_dt = event_dt[ _horiz_f ? NR::Y : NR::X ];
sp_repr_set_svg_double(repr, "position", guide_pos_dt);
SP_OBJECT_REPR(_dt->namedview)->appendChild(repr);
Inkscape::GC::release(repr);
repr->setAttribute("orientation", _horiz_f ? "horizontal" : "vertical");
double const guide_pos_dt = event_dt[ _horiz_f ? NR::Y : NR::X ];
sp_repr_set_svg_double(repr, "position", guide_pos_dt);
SP_OBJECT_REPR(_dt->namedview)->appendChild(repr);
Inkscape::GC::release(repr);
- sp_document_done(sp_desktop_document(_dt));
+ sp_document_done(sp_desktop_document(_dt), SP_VERB_NONE,
+ /* TODO: annotate */ "ruler.cpp:157");
}
_dt->set_coordinate_status(event_dt);
}
}
_dt->set_coordinate_status(event_dt);
}