summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-07-11 00:42:57 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-07-11 00:42:57 +0000
commit6fc47b613fb0b33b4866a5e54c231e9426e2ca3d (patch)
tree99cfc1cc42d5234e9b109fbca062dfd7833ccd6f /src
parentTranslations. French translation update. (diff)
downloadinkscape-6fc47b613fb0b33b4866a5e54c231e9426e2ca3d.tar.gz
inkscape-6fc47b613fb0b33b4866a5e54c231e9426e2ca3d.zip
Fix for 167781 : opacity in selected style loses focus on kbd value scroll, fix for Esc
(bzr r11540)
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/selected-style.cpp1
-rw-r--r--src/widgets/spinbutton-events.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 88341a0e8..867ec62a9 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -338,6 +338,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed));
// Connect to key-press to ensure focus is consistent with other spin buttons when using the keys vs mouse-click
g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "key-press-event", G_CALLBACK (spinbutton_keypress), _opacity_sb.gobj());
+ g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "focus-in-event", G_CALLBACK (spinbutton_focus_in), _opacity_sb.gobj());
_fill_place.add(_na[SS_FILL]);
_fill_place.set_tooltip_text(__na[SS_FILL]);
diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp
index 7f1a1f8c6..290b0bb75 100644
--- a/src/widgets/spinbutton-events.cpp
+++ b/src/widgets/spinbutton-events.cpp
@@ -43,7 +43,9 @@ void
spinbutton_undo (GtkWidget *w)
{
gdouble *ini = (gdouble *) g_object_get_data(G_OBJECT (w), "ini");
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), *ini);
+ if (ini) {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), *ini);
+ }
}
void