Skip to content
Permalink
Browse files
Added possibility not to draw vertex markers when a layer is in editi…
…ng mode

git-svn-id: http://svn.osgeo.org/qgis/trunk@10121 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Feb 7, 2009
1 parent 70e7bb8 commit 092937a3f4e133643634f4e5396535aa429c06e3
Showing with 17 additions and 3 deletions.
  1. +9 −0 src/app/qgsoptions.cpp
  2. +6 −2 src/core/qgsvectorlayer.cpp
  3. +2 −1 src/core/qgsvectorlayer.h
@@ -207,6 +207,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
//vertex marker
mMarkerStyleComboBox->addItem( tr( "Semi transparent circle" ) );
mMarkerStyleComboBox->addItem( tr( "Cross" ) );
mMarkerStyleComboBox->addItem( tr( "None" ) );

QString markerStyle = settings.value( "/qgis/digitizing/marker_style", "SemiTransparentCircle" ).toString();
if ( markerStyle == "SemiTransparentCircle" )
@@ -217,6 +218,10 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
{
mMarkerStyleComboBox->setCurrentIndex( mMarkerStyleComboBox->findText( tr( "Cross" ) ) );
}
else if (markerStyle == "None" )
{
mMarkerStyleComboBox->setCurrentIndex( mMarkerStyleComboBox->findText( tr( "None" ) ) );
}

chkDisableAttributeValuesDlg->setChecked( settings.value( "/qgis/digitizing/disable_enter_attribute_values_dialog", false ).toBool() );

@@ -387,6 +392,10 @@ void QgsOptions::saveOptions()
{
settings.setValue( "/qgis/digitizing/marker_style", "Cross" );
}
else if ( markerComboText == tr( "None" ) )
{
settings.setValue( "/qgis/digitizing/marker_style", "None" );
}

settings.setValue( "/qgis/digitizing/disable_enter_attribute_values_dialog", chkDisableAttributeValuesDlg->isChecked() );

@@ -808,7 +808,7 @@ void QgsVectorLayer::drawVertexMarker( int x, int y, QPainter& p, QgsVectorLayer
p.setBrush( QColor( 200, 200, 210, 120 ) );
p.drawEllipse( QRectF( x - 7, y - 7, 14, 14 ) );
}
else
else if ( type == QgsVectorLayer::Cross )
{
int size = 15;
int m = ( size - 1 ) / 2;
@@ -3303,10 +3303,14 @@ QgsVectorLayer::VertexMarkerType QgsVectorLayer::currentVertexMarkerType()
{
return QgsVectorLayer::Cross;
}
else
else if ( markerTypeString == "SemiTransparentCircle" )
{
return QgsVectorLayer::SemiTransparentCircle;
}
else
{
return QgsVectorLayer::NoMarker;
}
}

void QgsVectorLayer::drawFeature( QPainter* p,
@@ -465,7 +465,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
enum VertexMarkerType
{
SemiTransparentCircle,
Cross
Cross,
NoMarker /* added in version 1.1 */
};

/** vector layers are not copyable */

0 comments on commit 092937a

Please sign in to comment.