summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-19 10:50:29 +0000
committerjabiertxof <info@marker.es>2016-10-19 10:50:29 +0000
commitf2d2c7740567dcf2452c41d8332380708f557157 (patch)
tree8ed1302a7cd2dc82f2621a5707ed0f19f4c83a20 /src/widgets/desktop-widget.cpp
parentReposition widget and add degree symbol (diff)
downloadinkscape-f2d2c7740567dcf2452c41d8332380708f557157.tar.gz
inkscape-f2d2c7740567dcf2452c41d8332380708f557157.zip
Working with rotate preview
(bzr r15142.1.15)
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 16d71b4d2..e868dd2d6 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -62,7 +62,6 @@
#include "spw-utilities.h"
#include "toolbox.h"
#include "widget-sizes.h"
-
#include "verbs.h"
#include <gtkmm/cssprovider.h>
#include <gtkmm/paned.h>
@@ -1785,15 +1784,20 @@ sp_desktop_widget_rotate_document(GtkSpinButton *spin, SPDesktopWidget *dtw)
{
SPNamedView *nv = dtw->desktop->namedview;
double value = gtk_spin_button_get_value (spin);
- if (!dtw->desktop->getDocument()->getRoot()->rotated && value != nv->document_rotation) {
- nv->document_rotation = value;
- sp_repr_set_svg_double(nv->getRepr(), "inkscape:document-rotation", value);
- SPObject *updated = SP_OBJECT(nv);
- if (updated) {
- updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
- }
- }
- spinbutton_defocus (GTK_WIDGET(spin));
+// if (!dtw->desktop->getDocument()->getRoot()->rotated && value != nv->document_rotation) {
+// nv->document_rotation = value;
+// sp_repr_set_svg_double(nv->getRepr(), "inkscape:document-rotation", value);
+// SPObject *updated = SP_OBJECT(nv);
+// if (updated) {
+// updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+// }
+// //dtw->desktop->canvas->endRotateTo();
+// } else if( value != nv->document_rotation ) {
+ dtw->desktop->canvas->startRotateTo(0);
+ dtw->desktop->canvas->rotateTo(dtw->desktop->getDrawing(),value);
+ if (value == 180) { dtw->desktop->canvas->endRotateTo();}
+// }
+ spinbutton_defocus (GTK_WIDGET(spin));
}