Revision: 6818 http://playerstage.svn.sourceforge.net/playerstage/?rev=6818&view=rev Author: alexcb Date: 2008-07-08 11:28:03 -0700 (Tue, 08 Jul 2008)
Log Message: ----------- enabled ctrl-click model rotation for those of us who don't always have more than one button Modified Paths: -------------- code/stage/trunk/libstage/canvas.cc Modified: code/stage/trunk/libstage/canvas.cc =================================================================== --- code/stage/trunk/libstage/canvas.cc 2008-07-08 18:22:33 UTC (rev 6817) +++ code/stage/trunk/libstage/canvas.cc 2008-07-08 18:28:03 UTC (rev 6818) @@ -345,7 +345,7 @@ int dx = Fl::event_x() - startx; int dy = Fl::event_y() - starty; - if ( Fl::event_state( FL_BUTTON1 ) ) { + if ( Fl::event_state( FL_BUTTON1 ) && Fl::event_state( FL_CTRL ) == false ) { // Left mouse button drag if ( selectedModel ) { // started dragging on a selected model @@ -375,12 +375,12 @@ invalidate(); // so the projection gets updated } } - else if ( Fl::event_state( FL_BUTTON3 ) ) { + else if ( Fl::event_state( FL_BUTTON3 ) || ( Fl::event_state( FL_BUTTON1 ) && Fl::event_state( FL_CTRL ) ) ) { // rotate all selected models for( GList* it = selected_models; it; it=it->next ) { StgModel* mod = (StgModel*)it->data; - mod->AddToPose( 0,0,0, 0.05*dx ); + mod->AddToPose( 0,0,0, 0.05*(dx+dy) ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit