Ignore:
Timestamp:
2010-11-17T11:53:34+01:00 (14 years ago)
Author:
ocroquette
Message:

Precision of rotation and scaling is now increased when pressing the SHIFT key

Location:
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java

    r23190 r24288  
    8787        // Rotate the picture
    8888        if(mb_dragging) {
    89             // TODO: Magic number
    90             m_currentLayer.rotatePictureBy( ( e.getY() - m_prevY ) / 10.0 );
     89            double factor;
     90            if ( ( e.getModifiersEx() & e.SHIFT_DOWN_MASK ) != 0 ) {
     91                factor = Main.pref.getDouble("piclayer.rotatefactors.high_precision", 100.0);
     92            }
     93            else {
     94                factor = Main.pref.getDouble("piclayer.rotatefactors.low_precision", 10.0 );
     95            }           
     96            m_currentLayer.rotatePictureBy( ( e.getY() - m_prevY ) / factor );
    9197            m_prevY = e.getY();
    9298            Main.map.mapView.repaint();
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java

    r23190 r24288  
    8585        // Scale the picture
    8686        if(mb_dragging) {
    87             doTheScale( ( e.getY() - m_prevY ) / 500.0 );
     87            double factor;
     88            if ( ( e.getModifiersEx() & e.SHIFT_DOWN_MASK ) != 0 ) {
     89                factor = Main.pref.getDouble("piclayer.scalefactors.high_precision", 4000);
     90            }
     91            else {
     92                factor = Main.pref.getDouble("piclayer.scalefactors.low_precision", 400);
     93            }           
     94            doTheScale( ( e.getY() - m_prevY ) / factor );
    8895            m_prevY = e.getY();
    8996            Main.map.mapView.repaint();
Note: See TracChangeset for help on using the changeset viewer.