mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Refine z order for some new items
This commit is contained in:
parent
0d0a3c2cdc
commit
3dbc1a0c2a
@ -23,9 +23,10 @@ class QgsLayout : QGraphicsScene, QgsExpressionContextGenerator
|
||||
enum ZValues
|
||||
{
|
||||
ZPage,
|
||||
ZItem,
|
||||
ZGrid,
|
||||
ZMapTool,
|
||||
|
||||
ZSnapIndicator,
|
||||
};
|
||||
|
||||
QgsLayout( QgsProject *project );
|
||||
|
@ -42,9 +42,10 @@ class CORE_EXPORT QgsLayout : public QGraphicsScene, public QgsExpressionContext
|
||||
enum ZValues
|
||||
{
|
||||
ZPage = 0, //!< Z-value for page (paper) items
|
||||
ZItem = 1, //!< Minimum z value for items
|
||||
ZGrid = 9999, //!< Z-value for page grids
|
||||
ZMapTool = 10000, //!< Z-value for temporary map tool items
|
||||
|
||||
ZSnapIndicator = 10001, //!< Z-value for snapping indicator
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -29,6 +29,8 @@ QgsLayoutItem::QgsLayoutItem( QgsLayout *layout )
|
||||
, QGraphicsRectItem( 0 )
|
||||
, mUuid( QUuid::createUuid().toString() )
|
||||
{
|
||||
setZValue( QgsLayout::ZItem );
|
||||
|
||||
// needed to access current view transform during paint operations
|
||||
setFlags( flags() | QGraphicsItem::ItemUsesExtendedStyleOption );
|
||||
setCacheMode( QGraphicsItem::DeviceCoordinateCache );
|
||||
|
@ -439,6 +439,7 @@ QgsLayoutViewSnapMarker::QgsLayoutViewSnapMarker()
|
||||
setPen( QPen( Qt::transparent, mSize ) );
|
||||
|
||||
setFlags( flags() | QGraphicsItem::ItemIgnoresTransformations );
|
||||
setZValue( QgsLayout::ZSnapIndicator );
|
||||
}
|
||||
|
||||
void QgsLayoutViewSnapMarker::paint( QPainter *p, const QStyleOptionGraphicsItem *, QWidget * )
|
||||
|
Loading…
x
Reference in New Issue
Block a user