From 035938733c3d0754dfa2250cda1af5b04cdf43c4 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 15 Jul 2012 16:11:36 +0900 Subject: Fix for 167846 : Focus issue between spinbuttons when using Tab (bzr r11550) --- src/ege-adjustment-action.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp index 8ee240b30..398eb9d33 100644 --- a/src/ege-adjustment-action.cpp +++ b/src/ege-adjustment-action.cpp @@ -780,6 +780,13 @@ static GtkWidget* create_menu_item( GtkAction* action ) void value_changed_cb( GtkSpinButton* spin, EgeAdjustmentAction* act ) { if ( gtk_widget_has_focus( GTK_WIDGET(spin) ) ) { + gint start = 0, end = 0; + if (gtk_editable_get_selection_bounds (GTK_EDITABLE(spin), &start, &end) + && start != end) { + // #167846, #363000 If the spin button has a selection, its probably + // because we got here from a Tab key from another spin, if so dont defocus + return; + } ege_adjustment_action_defocus( act ); } } -- cgit v1.2.3