summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorJohn Bintz <me@johnbintz.com>2006-07-23 03:32:23 +0000
committerjohncoswell <johncoswell@users.sourceforge.net>2006-07-23 03:32:23 +0000
commite12fb519c55f93d11a13c162daa3572e7fc02b3e (patch)
tree7d73a9c5ad47df2e65a0338c438365f7320b963a /src/desktop.cpp
parentpatch from John Bintz, adding pref to simplify multiple paths separately (diff)
downloadinkscape-e12fb519c55f93d11a13c162daa3572e7fc02b3e.tar.gz
inkscape-e12fb519c55f93d11a13c162daa3572e7fc02b3e.zip
Forced redraw of canvas upon document commit to work around event starvation issue at high zoom levels
(bzr r1458)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 49a43bc37..cbd5ffa60 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -248,7 +248,9 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
_reconstruction_finish_connection =
document->connectReconstructionFinish(sigc::bind(sigc::ptr_fun(_reconstruction_finish), this));
_reconstruction_old_layer_id = NULL;
-
+
+ _commit_connection = document->connectCommit(sigc::bind(sigc::ptr_fun(&sp_canvas_update_now), this->canvas));
+
// ?
// sp_active_desktop_set (desktop);
_inkscape = INKSCAPE;
@@ -1048,6 +1050,7 @@ SPDesktop::onRedrawRequested ()
/**
* Associate document with desktop.
*/
+/// \todo fixme: refactor SPDesktop::init to use setDocument
void
SPDesktop::setDocument (SPDocument *doc)
{
@@ -1066,6 +1069,9 @@ SPDesktop::setDocument (SPDocument *doc)
_layer_hierarchy->connectChanged(sigc::bind(sigc::ptr_fun(_layer_hierarchy_changed), this));
_layer_hierarchy->setTop(SP_DOCUMENT_ROOT(doc));
+ _commit_connection.disconnect();
+ _commit_connection = doc->connectCommit(sigc::bind(sigc::ptr_fun(&sp_canvas_update_now), this->canvas));
+
/// \todo fixme: This condition exists to make sure the code
/// inside is called only once on initialization. But there
/// are surely more safe methods to accomplish this.