[QGIS Commit] r10121 - in trunk/qgis/src: app core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Feb 7 07:51:13 EST 2009
Author: wonder
Date: 2009-02-07 07:51:13 -0500 (Sat, 07 Feb 2009)
New Revision: 10121
Modified:
trunk/qgis/src/app/qgsoptions.cpp
trunk/qgis/src/core/qgsvectorlayer.cpp
trunk/qgis/src/core/qgsvectorlayer.h
Log:
Added possibility not to draw vertex markers when a layer is in editing mode
Modified: trunk/qgis/src/app/qgsoptions.cpp
===================================================================
--- trunk/qgis/src/app/qgsoptions.cpp 2009-02-07 12:08:07 UTC (rev 10120)
+++ trunk/qgis/src/app/qgsoptions.cpp 2009-02-07 12:51:13 UTC (rev 10121)
@@ -207,6 +207,7 @@
//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 @@
{
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 @@
{
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() );
Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp 2009-02-07 12:08:07 UTC (rev 10120)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp 2009-02-07 12:51:13 UTC (rev 10121)
@@ -808,7 +808,7 @@
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 @@
{
return QgsVectorLayer::Cross;
}
- else
+ else if ( markerTypeString == "SemiTransparentCircle" )
{
return QgsVectorLayer::SemiTransparentCircle;
}
+ else
+ {
+ return QgsVectorLayer::NoMarker;
+ }
}
void QgsVectorLayer::drawFeature( QPainter* p,
Modified: trunk/qgis/src/core/qgsvectorlayer.h
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.h 2009-02-07 12:08:07 UTC (rev 10120)
+++ trunk/qgis/src/core/qgsvectorlayer.h 2009-02-07 12:51:13 UTC (rev 10121)
@@ -465,7 +465,8 @@
enum VertexMarkerType
{
SemiTransparentCircle,
- Cross
+ Cross,
+ NoMarker /* added in version 1.1 */
};
/** vector layers are not copyable */
More information about the QGIS-commit
mailing list