summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62ff335)
raw | patch | inline | side by side (parent: 62ff335)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 18 Nov 2006 19:28:34 +0000 (19:28 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 18 Nov 2006 19:28:34 +0000 (19:28 +0000) |
diff --git a/src/file.cpp b/src/file.cpp
index 3a2301c6d5795a152387baed41910e995be722fe..568d32572874d523c83b69445f4ed41917d5c7b0 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
sp_create_window(dtw, TRUE);
dt = static_cast<SPDesktop*>(dtw->view);
sp_namedview_window_from_document(dt);
+ sp_namedview_update_layers_from_document(dt);
}
return dt;
}
// everyone who cares now has a reference, get rid of ours
sp_document_unref(doc);
// resize the window to match the document properties
- // (this may be redundant for new windows... if so, move to the "virgin"
- // section above)
sp_namedview_window_from_document(desktop);
+ sp_namedview_update_layers_from_document(desktop);
if (add_to_recent) {
prefs_set_recent_file(SP_DOCUMENT_URI(doc), SP_DOCUMENT_NAME(doc));
diff --git a/src/interface.cpp b/src/interface.cpp
index 99f6c394fb2958f5c01e91aae1a5168bda772164..da734e671a059c8dacd20521a3ef28d65aba410a 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
sp_create_window(dtw, TRUE);
sp_namedview_window_from_document(static_cast<SPDesktop*>(dtw->view));
+ sp_namedview_update_layers_from_document(static_cast<SPDesktop*>(dtw->view));
}
/* TODO: not yet working */
index 35d87b4b5e3bc79719412aab17b2b2be3f054970..a5f2e25887be6a70648a2f366fedfdfaf1faca97 100644 (file)
sp_create_window(dtw, TRUE);
dt = static_cast<SPDesktop*>(dtw->view);
sp_namedview_window_from_document(dt);
+ sp_namedview_update_layers_from_document(dt);
}
return dt;
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 97640c87a1af6c53a54674c7aaa9fa0950ebb153..1b973a6ba0ea26cd4f8d7901b152328fe3658cdb 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
g_list_free(desktop->zooms_past);
desktop->zooms_past = NULL;
}
+}
+void sp_namedview_update_layers_from_document (SPDesktop *desktop)
+{
SPObject *layer = NULL;
SPDocument *document = desktop->doc();
+ SPNamedView *nv = desktop->namedview;
if ( nv->default_layer_id != 0 ) {
layer = document->getObjectById(g_quark_to_string(nv->default_layer_id));
}
diff --git a/src/sp-namedview.h b/src/sp-namedview.h
index e16f7a0beaac793b80a285eacfd1f562b68a4cf1..43913007e28a2d9ef1d8a21b9eab05edd3783266 100644 (file)
--- a/src/sp-namedview.h
+++ b/src/sp-namedview.h
void sp_namedview_window_from_document(SPDesktop *desktop);
void sp_namedview_document_from_window(SPDesktop *desktop);
+void sp_namedview_update_layers_from_document (SPDesktop *desktop);
void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr);
void sp_namedview_toggle_grid(SPDocument *doc, Inkscape::XML::Node *repr);
index 83566c1996798e12254e1a7cbf9d89e715108b54..0053ea1b767c8858c4cfff4e766cf835ea7cf90d 100644 (file)
_svg_canvas.init (_desktop);
_desktop->init (_namedview, _svg_canvas.spobj());
sp_namedview_window_from_document (_desktop);
+ sp_namedview_update_layers_from_document (_desktop);
_dt2r = 1.0 / _namedview->doc_units->unittobase;
/// \todo convert to sigc++ when SPObject hierarchy gets converted