Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reorder options
  • Loading branch information
elpaso committed May 12, 2023
1 parent 4fab764 commit 8724300
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -250,15 +250,14 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas *
mFloaterActionsMenu->addSeparator();

{
QAction *action = new QAction( tr( "Show XY coordinates" ), mFloaterActionsMenu );
QAction *action = new QAction( tr( "Show distance" ), mFloaterActionsMenu );
action->setCheckable( true );
mFloaterActionsMenu->addAction( action );
connect( action, &QAction::toggled, this, [ = ]( bool checked )
{
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::XCoordinate, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::YCoordinate, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::Distance, checked );
} );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/XYShowInFloater" ), true ).toBool() );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/DistanceShowInFloater" ), true ).toBool() );
}

{
Expand All @@ -273,14 +272,15 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas *
}

{
QAction *action = new QAction( tr( "Show M value" ), mFloaterActionsMenu );
QAction *action = new QAction( tr( "Show XY coordinates" ), mFloaterActionsMenu );
action->setCheckable( true );
mFloaterActionsMenu->addAction( action );
connect( action, &QAction::toggled, this, [ = ]( bool checked )
{
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::MCoordinate, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::XCoordinate, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::YCoordinate, checked );
} );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/MShowInFloater" ), true ).toBool() );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/XYShowInFloater" ), true ).toBool() );
}

{
Expand All @@ -295,25 +295,25 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas *
}

{
QAction *action = new QAction( tr( "Show common snapping angle" ), mFloaterActionsMenu );
QAction *action = new QAction( tr( "Show M value" ), mFloaterActionsMenu );
action->setCheckable( true );
mFloaterActionsMenu->addAction( action );
connect( action, &QAction::toggled, this, [ = ]( bool checked )
{
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::CommonAngleSnapping, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::MCoordinate, checked );
} );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/CommonAngleShowInFloater" ), false ).toBool() );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/MShowInFloater" ), true ).toBool() );
}

{
QAction *action = new QAction( tr( "Show distance" ), mFloaterActionsMenu );
QAction *action = new QAction( tr( "Show common snapping angle" ), mFloaterActionsMenu );
action->setCheckable( true );
mFloaterActionsMenu->addAction( action );
connect( action, &QAction::toggled, this, [ = ]( bool checked )
{
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::Distance, checked );
mFloater->setItemVisibility( QgsAdvancedDigitizingFloater::FloaterItem::CommonAngleSnapping, checked );
} );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/DistanceShowInFloater" ), true ).toBool() );
action->setChecked( QgsSettings().value( QStringLiteral( "/Cad/CommonAngleShowInFloater" ), false ).toBool() );
}

{
Expand Down

0 comments on commit 8724300

Please sign in to comment.