summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-10-25 02:48:06 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-10-25 02:48:06 +0000
commit41bb684f180db264ed37af7d58ef12079a582250 (patch)
treeb72086c73dd3d8d56b9e3bcd0efea74d1cf9529e /src
parentArabic translation update by SAGERAHMED. (diff)
downloadinkscape-41bb684f180db264ed37af7d58ef12079a582250.tar.gz
inkscape-41bb684f180db264ed37af7d58ef12079a582250.zip
remove registerEditWidget, move this to SPDesktop::init instead; a noop change but fixes a weird crash on Windows
(bzr r8805)
Diffstat (limited to 'src')
-rw-r--r--src/desktop.cpp4
-rw-r--r--src/desktop.h5
-rw-r--r--src/ui/view/edit-widget.cpp3
-rw-r--r--src/widgets/desktop-widget.cpp3
4 files changed, 6 insertions, 9 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index f7ef1a8cd..319a0d407 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -164,8 +164,10 @@ SPDesktop::SPDesktop() :
}
void
-SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
+SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas, Inkscape::UI::View::EditWidgetInterface *widget)
{
+ _widget = widget;
+
// Temporary workaround for link order issues:
Inkscape::DeviceManager::getManager().getDevices();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/desktop.h b/src/desktop.h
index 4438c90e5..cfb977425 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -180,7 +180,7 @@ struct SPDesktop : public Inkscape::UI::View::View
#endif
SPDesktop();
- void init (SPNamedView* nv, SPCanvas* canvas);
+ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget);
virtual ~SPDesktop();
void destroy();
@@ -303,9 +303,6 @@ struct SPDesktop : public Inkscape::UI::View::View
void fullscreen();
void focusMode(bool mode = true);
- void registerEditWidget (Inkscape::UI::View::EditWidgetInterface *widget)
- { _widget = widget; }
-
Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming)
Geom::Point w2d(Geom::Point const &p) const;
Geom::Point d2w(Geom::Point const &p) const;
diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp
index 1d319f97f..770a9bf87 100644
--- a/src/ui/view/edit-widget.cpp
+++ b/src/ui/view/edit-widget.cpp
@@ -1551,11 +1551,10 @@ void
EditWidget::initEdit (SPDocument *doc)
{
_desktop = new SPDesktop();
- _desktop->registerEditWidget (this);
_namedview = sp_document_namedview (doc, 0);
_svg_canvas.init (_desktop);
- _desktop->init (_namedview, _svg_canvas.spobj());
+ _desktop->init (_namedview, _svg_canvas.spobj(), this);
sp_namedview_window_from_document (_desktop);
sp_namedview_update_layers_from_document (_desktop);
_dt2r = 1.0 / _namedview->doc_units->unittobase;
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 5fd32487f..e3bf1ae9c 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -1339,8 +1339,7 @@ sp_desktop_widget_new (SPNamedView *namedview)
dtw->desktop = new SPDesktop();
dtw->stub = new SPDesktopWidget::WidgetStub (dtw);
- dtw->desktop->registerEditWidget (dtw->stub);
- dtw->desktop->init (namedview, dtw->canvas);
+ dtw->desktop->init (namedview, dtw->canvas, dtw->stub);
inkscape_add_desktop (dtw->desktop);
// Add the shape geometry to libavoid for autorouting connectors.