Fixed double initialitation of the field state_ in InputDevice.
authorgballintijn <gballintijn@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 12 Apr 2009 12:48:42 +0000 (12:48 +0000)
committerCarlos Lopez <carlos@pcnuevo.(none)>
Fri, 12 Jun 2009 14:27:22 +0000 (16:27 +0200)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2359 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/inputdevice.cpp

index 4a513a6..f575469 100644 (file)
@@ -160,36 +160,13 @@ public:
 InputDevice::InputDevice(const synfig::String id_, Type type_):
        id_(id_),
        type_(type_),
-       state_((type_==TYPE_PEN)?"sketch":"normal"),
+       state_((type_==TYPE_PEN)?"draw":"normal"),
        foreground_color_(Color::black()),
        background_color_(Color::white()),
        bline_width_(Distance(1,Distance::SYSTEM_POINTS)),
        opacity_(1.0f),
        blend_method_(Color::BLEND_COMPOSITE)
 {
-       switch(type_)
-       {
-               case TYPE_MOUSE:
-                       state_="normal";
-                       break;
-
-               case TYPE_PEN:
-                       state_="draw";
-                       break;
-
-               case TYPE_ERASER:
-                       state_="normal";
-                       break;
-
-               case TYPE_CURSOR:
-                       state_="normal";
-                       break;
-
-               default:
-                       state_="normal";
-                       break;
-       }
-
        device_settings=new DeviceSettings(this);
        Main::settings().add_domain(device_settings,"input_device."+id_);
 }