summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-03-20 20:12:31 +0000
committertavmjong-free <tavmjong@free.fr>2017-03-20 20:12:31 +0000
commitf47466c701b2256b2ce232f6d311d2be47136eab (patch)
tree656e3f47c008066434975b3b0ed8c20832a83116 /src/file.cpp
parentModify CanvasXYGrid to work with rotated canvas. (diff)
downloadinkscape-f47466c701b2256b2ce232f6d311d2be47136eab.tar.gz
inkscape-f47466c701b2256b2ce232f6d311d2be47136eab.zip
Implement rotation via desktop to window affine.
Remove rotation via viewbox. Still some work to do... (bzr r15603)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/file.cpp b/src/file.cpp
index fc9ce6b19..795df433d 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -293,12 +293,10 @@ bool sp_file_open(const Glib::ustring &uri,
bool replace_empty)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Inkscape::Display::TemporaryItem *page_border_rotated = NULL;
if (desktop) {
desktop->setWaitingCursor();
- page_border_rotated = sp_document_namedview(desktop->getDocument(), NULL)->page_border_rotated;
}
-
+
SPDocument *doc = NULL;
bool cancelled = false;
try {
@@ -317,6 +315,7 @@ bool sp_file_open(const Glib::ustring &uri,
}
if (doc) {
+
SPDocument *existing = desktop ? desktop->getDocument() : NULL;
if (existing && existing->virgin && replace_empty) {
@@ -324,7 +323,6 @@ bool sp_file_open(const Glib::ustring &uri,
doc->ensureUpToDate(); // TODO this will trigger broken link warnings, etc.
desktop->change_document(doc);
doc->emitResizedSignal(doc->getWidth().value("px"), doc->getHeight().value("px"));
- desktop->remove_temporary_canvasitem(page_border_rotated);
} else {
// create a whole new desktop and window
SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); // TODO this will trigger broken link warnings, etc.