mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added possibility not to draw vertex markers when a layer is in editing mode
git-svn-id: http://svn.osgeo.org/qgis/trunk@10121 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
70e7bb8f81
commit
092937a3f4
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user