[josm-dev] Process to commit a patch ?
Olivier Croquette
ml at ocroquette.de
Wed Nov 10 11:15:04 GMT 2010
Hi !
I would like to commit the patch below to increase the precision of the PicLayer rotation and scaling.
Since i have a SVN account, I can technically just do it, but what's the process to do so ? Is there a review ? A defined process ?
Thanks,
Olivier
svn diff
Index: src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java
===================================================================
--- src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java (revision 24177)
+++ src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java (working copy)
@@ -82,9 +82,13 @@
@Override
public void mouseDragged(MouseEvent e) {
// Scale the picture
+ double multiplier = 1.0;
+ if ( ( e.getModifiersEx() & e.SHIFT_DOWN_MASK ) != 0 )
+ multiplier = 0.2;
if(mb_dragging) {
- doTheScale( ( e.getY() - m_prevY ) / 500.0 );
+ doTheScale( multiplier * ( e.getY() - m_prevY ) / 500.0 );
m_prevY = e.getY();
Main.map.mapView.repaint();
}
Index: src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java
===================================================================
--- src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java (revision 24177)
+++ src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java (working copy)
@@ -84,10 +84,14 @@
@Override
public void mouseDragged(MouseEvent e) {
// Rotate the picture
+ double multiplier = 1.0;
+ if ( ( e.getModifiersEx() & e.SHIFT_DOWN_MASK ) != 0 )
+ multiplier = 0.2;
if(mb_dragging) {
// TODO: Magic number
- m_currentLayer.rotatePictureBy( ( e.getY() - m_prevY ) / 10.0 );
+ m_currentLayer.rotatePictureBy( multiplier * ( e.getY() - m_prevY ) / 10.0 );
m_prevY = e.getY();
Main.map.mapView.repaint();
}
More information about the josm-dev
mailing list