From 39997fbd501b843f90178edfad577628f2ae7b20 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 3 Dec 2008 17:52:45 +0000 Subject: [PATCH] Fix 2378787: "two waypoints created from a single edit". git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2308 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp | 9 +++++++++ synfig-studio/trunk/src/gtkmm/cellrenderer_value.h | 1 + 2 files changed, 10 insertions(+) diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp index 34af34e..456dee7 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp @@ -509,6 +509,7 @@ CellRenderer_ValueBase::start_editing_vfunc( const Gdk::Rectangle& cell_area __attribute__ ((unused)), Gtk::CellRendererState flags __attribute__ ((unused))) { + edit_value_done_called = false; // If we aren't editable, then there is nothing to do if(!property_editable()) return 0; @@ -581,6 +582,14 @@ CellRenderer_ValueBase::start_editing_vfunc( void CellRenderer_ValueBase::on_value_editing_done() { + if (edit_value_done_called) + { + synfig::error("on_value_editing_done(): Called twice!"); + return; + } + + edit_value_done_called = true; + if(value_entry) { ValueBase old_value(property_value_.get_value()); diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.h b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.h index 4aba7b9..14a425d 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.h +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.h @@ -87,6 +87,7 @@ class CellRenderer_ValueBase : public Gtk::CellRendererText void gradient_edited(synfig::Gradient gradient, Glib::ustring path); void color_edited(synfig::Color color, Glib::ustring path); + bool edit_value_done_called; public: sigc::signal &signal_secondary_click() {return signal_secondary_click_; } -- 2.7.4