Navigation Menu

Skip to content

Commit

Permalink
icon added,fixed issue with no selection on
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayan authored and mhugent committed Jan 12, 2013
1 parent f210b84 commit eef2efc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -142,6 +142,7 @@
<file>themes/default/mActionReshape.png</file>
<file>themes/default/mActionRollbackAllEdits.svg</file>
<file>themes/default/mActionRollbackEdits.svg</file>
<file>themes/default/mActionRotateFeature.png</file>
<file>themes/default/mActionRotateLabel.png</file>
<file>themes/default/mActionRotateLabel.svg</file>
<file>themes/default/mActionRotatePointSymbols.png</file>
Expand Down
Binary file added images/themes/default/mActionRotateFeature.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -1701,7 +1701,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionPasteFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionEditPaste.png" ) );
mActionAddFeature->setIcon( QgsApplication::getThemeIcon( "/mActionCapturePoint.png" ) );
mActionMoveFeature->setIcon( QgsApplication::getThemeIcon( "/mActionMoveFeature.png" ) );
//mActionRotateFeature->setIcon( QgsApplication::getThemeIcon( "/mActionRotateFeature.png" ) );
mActionRotateFeature->setIcon( QgsApplication::getThemeIcon( "/mActionRotateFeature.png" ) );
mActionReshapeFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionReshape.png" ) );
mActionSplitFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionSplitFeatures.svg" ) );
mActionDeleteSelected->setIcon( QgsApplication::getThemeIcon( "/mActionDeleteSelected.png" ) );
Expand Down
5 changes: 3 additions & 2 deletions src/app/qgsmaptoolrotatefeature.cpp
Expand Up @@ -33,6 +33,7 @@
QgsMapToolRotateFeature::QgsMapToolRotateFeature( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas ), mRubberBand( 0 )
{
mRotation = 0;
mAnchorPoint = 0;
}

QgsMapToolRotateFeature::~QgsMapToolRotateFeature()
Expand Down Expand Up @@ -92,7 +93,7 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )
}
else
{
mMovedFeatures = vlayer->selectedFeaturesIds();
mRotatedFeatures = vlayer->selectedFeaturesIds();

mRubberBand = createRubberBand();
for ( int i = 0; i < vlayer->selectedFeatureCount(); i++ )
Expand Down Expand Up @@ -143,7 +144,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QMouseEvent * e )
}

int i = 0;
foreach ( QgsFeatureId id, mMovedFeatures )
foreach ( QgsFeatureId id, mRotatedFeatures )
{
QgsFeature feat;
vlayer->featureAtId( id, feat );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatefeature.h
Expand Up @@ -61,7 +61,7 @@ class QgsMapToolRotateFeature: public QgsMapToolEdit
QgsRubberBand* mRubberBand;

/**Id of moved feature*/
QgsFeatureIds mMovedFeatures;
QgsFeatureIds mRotatedFeatures;
double mRotation;

QPoint mStPoint;
Expand Down
22 changes: 13 additions & 9 deletions src/ui/qgisapp.ui
Expand Up @@ -1970,15 +1970,19 @@ Acts on currently active editable layer</string>
</property>
</action>
<action name="mActionRotateFeature">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Rotate Feature(s)</string>
</property>
<property name="toolTip">
<string>Rotate Feature(s)</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionRotateFeature.png</normaloff>:/images/themes/default/mActionRotateFeature.png</iconset>
</property>
<property name="text">
<string>Rotate Feature(s)</string>
</property>
<property name="toolTip">
<string>Rotate Feature(s)</string>
</property>
</action>
</widget>
<resources>
Expand Down

0 comments on commit eef2efc

Please sign in to comment.