diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-03-25 22:05:48 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-03-25 22:05:48 +0000 |
| commit | fdc95626108a36c42fc7cd33be24378fd5dc4ef8 (patch) | |
| tree | 046f63caeb7b807eca0e38aeaa24fcac079f4b9f /src/display/canvas-grid.cpp | |
| parent | Improve dependencies using URI normalization. A little faster, too. (diff) | |
| download | inkscape-fdc95626108a36c42fc7cd33be24378fd5dc4ef8.tar.gz inkscape-fdc95626108a36c42fc7cd33be24378fd5dc4ef8.zip | |
Purging old axonometric grid code: reworked it into the new grid class structure. Still needs alot of work (snapping mostly and code cleansing).
(bzr r2757)
Diffstat (limited to 'src/display/canvas-grid.cpp')
| -rw-r--r-- | src/display/canvas-grid.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 853fc011e..643ffccdc 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -9,7 +9,6 @@ #include "sp-canvas-util.h" -#include "canvas-grid.h" #include "display-forward.h" #include <libnr/nr-pixops.h> #include "desktop-handles.h" @@ -21,11 +20,11 @@ #include "sp-namedview.h" #include "inkscape.h" #include "desktop.h" -#include "display/canvas-grid.h" -#include "display/canvas-axonomgrid.h" -#include "../document.h" +#include "../document.h" +#include "canvas-grid.h" +#include "canvas-axonomgrid.h" namespace Inkscape { @@ -184,9 +183,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, const char * gridtype Inkscape::XML::Document *xml_doc = sp_document_repr_doc(sp_desktop_document(SP_ACTIVE_DESKTOP)); Inkscape::XML::Node *newnode; newnode = xml_doc->createElement("inkscape:grid"); - if (!strcmp(gridtype,"xygrid")) { - newnode->setAttribute("type","xygrid"); - } + newnode->setAttribute("type",gridtype); repr->appendChild(newnode); @@ -207,6 +204,8 @@ CanvasGrid::NewGrid(SPDesktop *desktop, Inkscape::XML::Node * in_repr, const cha if (!strcmp(gridtype,"xygrid")) { return (CanvasGrid*) new CanvasXYGrid(desktop, in_repr); + } else if (!strcmp(gridtype,"axonometric")) { + return (CanvasGrid*) new CanvasAxonomGrid(desktop, in_repr); } return NULL; @@ -331,7 +330,6 @@ CanvasXYGrid::CanvasXYGrid (SPDesktop *desktop, Inkscape::XML::Node * in_repr) const Gtk::Widget* widget_array[] = { 0, _rcbgrid._button, - 0, _rrb_gridtype._hbox, _rumg._label, _rumg._sel, 0, _rsu_ox.getSU(), 0, _rsu_oy.getSU(), |
