summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-01-20 18:35:46 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-01-20 18:35:46 +0000
commitda5621d2df20473ec743a788b87f5eea8006ba15 (patch)
treed51539257203569a7e680195642679d5c30e60bd /src/document.cpp
parentUse document rather than namedview in creating desktop widget. (diff)
downloadinkscape-da5621d2df20473ec743a788b87f5eea8006ba15.tar.gz
inkscape-da5621d2df20473ec743a788b87f5eea8006ba15.zip
No longer use widget data to store pointer to desktop widget.
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 3daae3deb..d8871da7d 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -49,6 +49,7 @@
#include "id-clash.h"
#include "inkscape-version.h"
#include "inkscape.h"
+#include "inkscape-window.h"
#include "profile-manager.h"
#include "rdf.h"
@@ -1825,9 +1826,9 @@ bool SPDocument::isSeeking() const {
void SPDocument::setModifiedSinceSave(bool modified) {
this->modified_since_save = modified;
if (SP_ACTIVE_DESKTOP) {
- Gtk::Window *parent = SP_ACTIVE_DESKTOP->getToplevel();
- if (parent) { // during load, SP_ACTIVE_DESKTOP may be !nullptr, but parent might still be nullptr
- SPDesktopWidget *dtw = static_cast<SPDesktopWidget *>(parent->get_data("desktopwidget"));
+ InkscapeWindow *window = SP_ACTIVE_DESKTOP->getInkscapeWindow();
+ if (window) { // during load, SP_ACTIVE_DESKTOP may be !nullptr, but parent might still be nullptr
+ SPDesktopWidget *dtw = window->get_desktop_widget();
dtw->updateTitle( this->getName() );
}
}