Skip to content
Permalink
Browse files

Simple naming and formatting change only

git-svn-id: http://svn.osgeo.org/qgis/trunk@11923 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Nov 6, 2009
1 parent 9040134 commit ca87ba06e4d5fd84addcefafca7961fb34eab1c0
Showing with 11 additions and 5 deletions.
  1. +7 −1 src/app/legend/qgslegend.cpp
  2. +4 −4 src/app/legend/qgslegendlayer.cpp
@@ -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 ) ) );
@@ -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
@@ -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 );
}

0 comments on commit ca87ba0

Please sign in to comment.
You can’t perform that action at this time.