Skip to content

Commit

Permalink
Simple naming and formatting change only
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11923 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Nov 6, 2009
1 parent 9040134 commit ca87ba0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ const int AUTOSCROLL_MARGIN = 16;
set mItemBeingMoved pointer to 0 to prevent SuSE 9.0 crash
*/
QgsLegend::QgsLegend( QWidget * parent, const char *name )
: QTreeWidget( parent ), mMousePressedFlag( false ), mItemBeingMoved( 0 ), mShowLegendLayerFiles( false ), mToggleEditingAction( 0 ), mMapCanvas( 0 ), mMinimumIconSize( 20, 20 )
: QTreeWidget( parent ),
mMousePressedFlag( false ),
mItemBeingMoved( 0 ),
mShowLegendLayerFiles( false ),
mToggleEditingAction( 0 ),
mMapCanvas( 0 ),
mMinimumIconSize( 20, 20 )
{
connect( this, SIGNAL( itemChanged( QTreeWidgetItem*, int ) ),
this, SLOT( handleItemChange( QTreeWidgetItem*, int ) ) );
Expand Down
8 changes: 4 additions & 4 deletions src/app/legend/qgslegendlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,15 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu, QAction* toggleEditingActio
theMenu.addAction( toggleEditingAction );
}

QgsVectorLayer* theVectorLayer = qobject_cast<QgsVectorLayer *>( firstLayer );
QgsVectorLayer* mypVectorLayer = qobject_cast<QgsVectorLayer *>( firstLayer );

if ( files.size() != 1 )
{
toggleEditingAction->setEnabled( false );
}
if ( theVectorLayer )
if ( mypVectorLayer )
{
toggleEditingAction->setChecked( theVectorLayer->isEditable() );
toggleEditingAction->setChecked( mypVectorLayer->isEditable() );
}

// save as shapefile
Expand All @@ -534,7 +534,7 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu, QAction* toggleEditingActio

// save selection as shapefile
QAction* saveSelectionAction = theMenu.addAction( tr( "Save selection as shapefile..." ), this, SLOT( saveSelectionAsShapefile() ) );
if ( files.size() != 1 || theVectorLayer->selectedFeatureCount() == 0 )
if ( files.size() != 1 || mypVectorLayer->selectedFeatureCount() == 0 )
{
saveSelectionAction->setEnabled( false );
}
Expand Down

0 comments on commit ca87ba0

Please sign in to comment.