diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-02-03 16:04:33 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-02-03 16:04:33 +0000 |
| commit | bc75860245b32e4a3bbe25c848d9f1a7613d4dac (patch) | |
| tree | 58424eb0c41b29d505e1b31a698c6e66dec58414 /src/desktop.cpp | |
| parent | Make units pc (pica) and ft (feet) work correctly. Closes: LP #167943. (diff) | |
| download | inkscape-bc75860245b32e4a3bbe25c848d9f1a7613d4dac.tar.gz inkscape-bc75860245b32e4a3bbe25c848d9f1a7613d4dac.zip | |
Fix missing ruler and document title updates when a file is opened in an existing window
(bzr r4640)
Diffstat (limited to 'src/desktop.cpp')
| -rw-r--r-- | src/desktop.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index 8cd63a68c..d2547f5a6 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -85,6 +85,7 @@ #include "layer-manager.h" #include "event-log.h" #include "display/canvas-grid.h" +#include "widgets/desktop-widget.h" #include "display/sp-canvas.h" @@ -501,6 +502,15 @@ SPDesktop::change_document (SPDocument *theDocument) selection->clear(); setDocument (theDocument); + + /* update the rulers, connect the desktop widget's signal to the new namedview etc. + (this can probably be done in a better way) */ + Gtk::Window *parent = this->getToplevel(); + g_assert(parent != NULL); + SPDesktopWidget *dtw = (SPDesktopWidget *) parent->get_data("desktopwidget"); + if (dtw) dtw->desktop = this; + sp_desktop_widget_update_namedview(dtw); + _namedview_modified (namedview, SP_OBJECT_MODIFIED_FLAG, this); _document_replaced_signal.emit (this, theDocument); } |
