diff --git a/src/text-context.cpp b/src/text-context.cpp
index a5af083859fc182a7c56d43ffd7bddc64b1f711d..e6f4f083b2945b006b0496707f328f5204255aac 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -352,7 +352,6 @@ sp_text_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
tc->dragging = 1;
- sp_event_context_snap_window_open(event_context);
}
ret = TRUE;
}
@@ -369,7 +368,6 @@ sp_text_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
tc->dragging = 2;
- sp_event_context_snap_window_open(event_context);
ret = TRUE;
}
}
@@ -381,14 +379,13 @@ sp_text_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
tc->dragging = 3;
- sp_event_context_snap_window_open(event_context);
ret = TRUE;
}
break;
case GDK_BUTTON_RELEASE:
if (event->button.button == 1 && tc->dragging && !event_context->space_panning) {
tc->dragging = 0;
- sp_event_context_snap_window_closed(event_context);
+ sp_event_context_discard_delayed_snap_event(event_context);
ret = TRUE;
}
break;
@@ -884,10 +881,10 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
if (MOD__CTRL_ONLY && tc->text) {
SPStyle const *style = sp_te_style_at_position(tc->text, std::min(tc->text_sel_start, tc->text_sel_end));
SPCSSAttr *css = sp_repr_css_attr_new();
- if (style->font_style.computed == SP_CSS_FONT_STYLE_NORMAL)
- sp_repr_css_set_property(css, "font-style", "italic");
- else
+ if (style->font_style.computed != SP_CSS_FONT_STYLE_NORMAL)
sp_repr_css_set_property(css, "font-style", "normal");
+ else
+ sp_repr_css_set_property(css, "font-style", "italic");
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
sp_repr_css_attr_unref(css);
sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
@@ -1279,6 +1276,9 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
}
Inkscape::Rubberband::get(desktop)->stop();
}
+ } else if ((group0_keyval == GDK_x || group0_keyval == GDK_X) && MOD__ALT_ONLY) {
+ desktop->setToolboxFocusTo ("altx-text");
+ return TRUE;
}
}
break;