summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f60fc9e)
raw | patch | inline | side by side (parent: f60fc9e)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 23 Jul 2006 04:31:19 +0000 (04:31 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 23 Jul 2006 04:31:19 +0000 (04:31 +0000) |
high zoom levels
diff --git a/ChangeLog b/ChangeLog
index 2a200a61d32f04d87ce50880c14646b91fc16860..8ba0bfe75bd40e560b9c2c23bbbc137ca012a6dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-07-23 John Bintz <jcoswell@coswellproductions.org>
+
+ * src/desktop.cpp, src/desktop.h
+
+ added SPDesktop::updateNow()
+
+ * src/event-context.cpp, src/select-context.cpp, src/node-context.cpp
+
+ forced redraw of canvas upon completion of selection or panning
+ to work around event starvation issue at high zoom levels
+
2006-07-22 John Bintz <jcoswell@coswellproductions.org>
* src/desktop.cpp, src/desktop.h, src/document-undo.cpp,
diff --git a/src/desktop.cpp b/src/desktop.cpp
index cbd5ffa6021cdd8926137218edba9d740548636f..b418627045df098f1ad26531f18710da560f5f36 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
#endif
#include <glibmm/i18n.h>
+#include <sigc++/functors/mem_fun.h>
#include "macros.h"
#include "inkscape-private.h"
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));
+ _commit_connection = document->connectCommit(sigc::mem_fun(*this, &SPDesktop::updateNow));
// ?
// sp_active_desktop_set (desktop);
inkscape_subselection_changed (this);
}
+void
+SPDesktop::updateNow()
+{
+ sp_canvas_update_now(canvas);
+}
+
//----------------------------------------------------------------------
// Callback implementations. The virtual ones are connected by the view.
_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));
+ _commit_connection = doc->connectCommit(sigc::mem_fun(*this, &SPDesktop::updateNow));
/// \todo fixme: This condition exists to make sure the code
/// inside is called only once on initialization. But there
diff --git a/src/desktop.h b/src/desktop.h
index dde2962a7e812ea157ea99d6aa804dd926a233f9..8e31e2e7dab590b85a3de3b47b9bf0c8525f0463 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
void setToolboxFocusTo (gchar const* label);
void setToolboxAdjustmentValue (gchar const* id, double val);
bool isToolboxButtonActive (gchar const *id);
+ void updateNow();
void fullscreen();
diff --git a/src/event-context.cpp b/src/event-context.cpp
index ab79f999bcb413def148fee6805a157d85bd8779..92dc711cf0f1c897181ace9a6339379690fa1cf3 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -454,6 +454,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
desktop->zoom_relative_keep_point(event_dt,
pow(zoom_inc, zoom_power));
gtk_timeout_add(250, (GtkFunction) grab_allow_again, NULL);
+ desktop->updateNow();
}
if (panning == event->button.button) {
panning = 0;
diff --git a/src/node-context.cpp b/src/node-context.cpp
index f38985c7106d8826f8ebaf9b81af7586dc59b356..8f8a48bf7718f9ddf06a90ed3af9590be447af76 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
@@ -452,6 +452,7 @@ sp_node_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
} else {
sp_nodepath_select_segment_near_point(nc->nodepath, nc->curvepoint_doc, false);
}
+ desktop->updateNow();
}
break;
case GDK_2BUTTON_PRESS:
@@ -464,8 +465,10 @@ sp_node_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
}
} else if (event->button.state & GDK_SHIFT_MASK) {
selection->toggle(item_clicked);
+ desktop->updateNow();
} else {
selection->set(item_clicked);
+ desktop->updateNow();
}
ret = TRUE;
}
ret = TRUE;
Inkscape::Rubberband::get()->stop();
+ desktop->updateNow();
nc->rb_escaped = false;
nc->drag = FALSE;
nc->hit = false;
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 7027de1efc66ea9a5d1aa09e5bab7f25209b7c7f..6cffdc076f7161c1f4fee26dfd86f4f5f82f0329 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
sp_canvas_item_ungrab(sc->grabbed, event->button.time);
sc->grabbed = NULL;
}
+
+ desktop->updateNow();
}
sc->button_press_shift = false;
sc->button_press_ctrl = false;