summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-11-27 16:18:45 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-11-27 16:18:45 +0000
commit2b769cc45cc030a4a3947e22daa174cf28bf57de (patch)
tree52e04bdd7ce6d9cbc9e6d718196e9b14f7992729 /src/selection-chemistry.cpp
parentComment out debugging output. (diff)
downloadinkscape-2b769cc45cc030a4a3947e22daa174cf28bf57de.tar.gz
inkscape-2b769cc45cc030a4a3947e22daa174cf28bf57de.zip
Add a rotation action.
Diffstat (limited to 'src/selection-chemistry.cpp')
-rwxr-xr-xsrc/selection-chemistry.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 082ff49a7..2f77e1093 100755
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -1875,9 +1875,10 @@ void ObjectSet::rotate90(bool ccw)
}
}
- DocumentUndo::done(document(),
- ccw ? SP_VERB_OBJECT_ROTATE_90_CCW : SP_VERB_OBJECT_ROTATE_90_CW,
- ccw ? _("Rotate 90\xc2\xb0 CCW") : _("Rotate 90\xc2\xb0 CW"));
+ if (document())
+ DocumentUndo::done(document(),
+ ccw ? SP_VERB_OBJECT_ROTATE_90_CCW : SP_VERB_OBJECT_ROTATE_90_CW,
+ ccw ? _("Rotate 90\xc2\xb0 CCW") : _("Rotate 90\xc2\xb0 CW"));
}
void ObjectSet::rotate(gdouble const angle_degrees)
@@ -1891,12 +1892,13 @@ void ObjectSet::rotate(gdouble const angle_degrees)
}
rotateRelative(*center_, angle_degrees);
- DocumentUndo::maybeDone(document(),
- ( ( angle_degrees > 0 )
- ? "selector:rotate:ccw"
- : "selector:rotate:cw" ),
- SP_VERB_CONTEXT_SELECT,
- _("Rotate"));
+ if (document())
+ DocumentUndo::maybeDone(document(),
+ ( ( angle_degrees > 0 )
+ ? "selector:rotate:ccw"
+ : "selector:rotate:cw" ),
+ SP_VERB_CONTEXT_SELECT,
+ _("Rotate"));
}
/*