summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-text.cpp7
-rw-r--r--src/ui/tools/text-tool.cpp13
2 files changed, 10 insertions, 10 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index ab75026b7..6ec04ca01 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -123,13 +123,14 @@ unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext
Geom::OptRect pb;
if(_drawable){
- pb = bounds_exact_transformed(*_font->PathVector(_glyph), ctx.ctm);
+ pb = bounds_exact_transformed(*_font->PathVector(42), ctx.ctm); //we fix to "X" char to allow always a reasonable bbox
+ pb->expandBy(pb->height()/20.0); //we scale a bit the area to in between char gaps mainly
}
- if(!pb){ // Fallback, spaces mostly
+ if(!pb){ // Fallback, spaces mostly, this never happendd with fixed gliph
Geom::Rect pbigbox(Geom::Point(0.0, _asc*scale_bigbox*0.66),Geom::Point(_width*scale_bigbox, 0.0));
pb = pbigbox * ctx.ctm;
}
-
+
#if 0
/* FIXME if this is commented out then not even an approximation of pick on decorations */
/* adjust the pick box up or down to include the decorations.
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 6b35990aa..ef21ffea7 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -494,13 +494,6 @@ bool TextTool::root_handler(GdkEvent* event) {
}
break;
case GDK_MOTION_NOTIFY: {
- if (this->over_text) {
- this->over_text = false;
- // update cursor and statusbar: we are not over a text object now
- this->cursor_shape = cursor_text_xpm;
- this->sp_event_context_update_cursor();
- desktop->event_context->defaultMessageContext()->clear();
- }
if (this->creating && (event->motion.state & GDK_BUTTON1_MASK) && !this->space_panning) {
if ( this->within_tolerance
&& ( abs( (gint) event->motion.x - this->xp ) < this->tolerance )
@@ -599,6 +592,12 @@ bool TextTool::root_handler(GdkEvent* event) {
_("<b>Click</b> to edit the flowed text, <b>drag</b> to select part of the text."));
}
this->over_text = true;
+ } else {
+ this->over_text = false;
+ // update cursor and statusbar: we are not over a text object now
+ this->cursor_shape = cursor_text_xpm;
+ this->sp_event_context_update_cursor();
+ desktop->event_context->defaultMessageContext()->clear();
}
return TRUE;
} break;