I couldn't find the cause in simgear/scene/model/animation.cxx because the solution is in $FG_SRC/src/Input/FGMouseInput.cxx :).

Attached a patch to get the old behaviour back.

Can it be commited please?

Thank you for interest.

regards
seb

Sébastien MARQUE wrote :
Hi,

I've tried different solutions with the source into simgear/scene/model/animation.cxx (mostly reverting some changes), even if I haven't found anything that I was able to clearly identify as the origin of my problem.

So I'm now using a workaround: I add a binding in each involved <action> section:
<binding>
  <command>property-assign</command>
  <property type="bool">/devices/status/mice/mouse[0]/freezed</property>
  <value type="bool">true</value>
</binding>

and I've modified $FGROOT/mice.xml in <mode n="0"> section (see conditions)
   <button n="2">
    <binding>
     <condition>
       <not>
         <property type="bool">/devices/status/mice/mouse[0]/freezed</property>
</not> </condition>
     <command>nasal</command>
     <script>
       setprop("/devices/status/mice/mouse[0]/mode", 
props.globals.getNode("/input/joysticks/js/id") == nil ? 1 : 2);
     </script>
    </binding>
    <binding>
      <condition>
        <property>/devices/status/mice/mouse[0]/freezed</property>
      </condition>
      <command>property-assign</command>
      <property type="bool">/devices/status/mice/mouse[0]/freezed</property>
      <value type="bool">false</value>
    </binding>
   </button>

It works fine here (even better than before the new behaviour). But I still think that it is a tricky solution.

regards
seb

Sébastien MARQUE wrote :
Hi all,



I've noticed that using right click on a pick animation doesn't only grab the correct <animation>'s binding, but also the mouse <button n="2"> binding (default: changing to mouse mode 1)... which can have some disastrous consequences.

Some instruments use the right-click as the zkv series (turning knobs right), the F16 hsi, Lionceau on some instruments, Long-EZ magnetos, G-164 altimeter, ch53e in many places over the front panel, and the Seneca II (flaps control).

I haven't used FG from last June 09 until November 09, and I remember that right-click on <pick> animation was known to work fine here in June 09.

I'm using FG/CVS, SG/CVS, plib/svn and OSG/svn all of them regularly compiled. I've also tried with plib 1.8.5 and osg 2.8.1 from debian/sid repos, with the same behaviour.

Is this a bug or a new feature?

Best regards
seb

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev _______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev _______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
? Input.diff
Index: FGMouseInput.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Input/FGMouseInput.cxx,v
retrieving revision 1.1
diff -u -p -r1.1 FGMouseInput.cxx
--- FGMouseInput.cxx	7 Aug 2009 19:00:18 -0000	1.1
+++ FGMouseInput.cxx	17 Dec 2009 17:12:58 -0000
@@ -270,6 +270,7 @@ void FGMouseInput::doMouseClick (int b, 
       // scenegraph intersection point corresponding to the mouse click
       if (updown == MOUSE_BUTTON_DOWN) {
         activePickCallbacks.init( b, ea );
+        return;
       }
     }
   }
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to