mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix attribute table shortcuts when docked [needs-docs]
Closes #29633, fix #29945
This commit is contained in:
parent
24e56a810c
commit
cd8f2f1e00
@ -1193,6 +1193,18 @@ void QgsAttributeTableDialog::toggleDockMode( bool docked )
|
||||
connect( this, &QObject::destroyed, mDock, &QWidget::close );
|
||||
QgisApp::instance()->addDockWidget( Qt::BottomDockWidgetArea, mDock );
|
||||
updateTitle();
|
||||
|
||||
// To prevent "QAction::event: Ambiguous shortcut overload"
|
||||
QgsDebugMsgLevel( QStringLiteral( "Remove shortcuts from attribute table already defined in main window" ), 2 );
|
||||
mActionCopySelectedRows->setShortcut( QKeySequence() );
|
||||
mActionPasteFeatures->setShortcut( QKeySequence() );
|
||||
mActionCutSelectedRows->setShortcut( QKeySequence() );
|
||||
mActionZoomMapToSelectedRows->setShortcut( QKeySequence() );
|
||||
mActionRemoveSelection->setShortcut( QKeySequence() );
|
||||
mActionSelectAll->setShortcut( QKeySequence() );
|
||||
// duplicated on Main Window, with different semantics
|
||||
mActionPanMapToSelectedRows->setShortcut( QKeySequence() );
|
||||
mActionSearchForm->setShortcut( QKeySequence() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1221,6 +1233,19 @@ void QgsAttributeTableDialog::toggleDockMode( bool docked )
|
||||
updateTitle();
|
||||
mDialog->restoreGeometry( QgsSettings().value( QStringLiteral( "Windows/BetterAttributeTable/geometry" ) ).toByteArray() );
|
||||
mDialog->show();
|
||||
|
||||
// restore attribute table shortcuts in window mode
|
||||
QgsDebugMsgLevel( QStringLiteral( "Restore attribute table dialog shortcuts in window mode" ), 2 );
|
||||
// duplicated on Main Window
|
||||
mActionCopySelectedRows->setShortcut( QKeySequence( QKeySequence::Copy ) );
|
||||
mActionPasteFeatures->setShortcut( QKeySequence( QKeySequence::Paste ) );
|
||||
mActionCutSelectedRows->setShortcut( QKeySequence( QKeySequence::Cut ) );
|
||||
mActionZoomMapToSelectedRows->setShortcut( QStringLiteral( "Ctrl+J" ) );
|
||||
mActionRemoveSelection->setShortcut( QStringLiteral( "Ctrl+Shift+A" ) );
|
||||
mActionSelectAll->setShortcut( QStringLiteral( "Ctrl+A" ) );
|
||||
// duplicated on Main Window, with different semantics
|
||||
mActionPanMapToSelectedRows->setShortcut( QStringLiteral( "Ctrl+P" ) );
|
||||
mActionSearchForm->setShortcut( QStringLiteral( "Ctrl+F" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -393,9 +393,6 @@
|
||||
<property name="toolTip">
|
||||
<string>Save edits (Ctrl+S)</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionReload">
|
||||
<property name="icon">
|
||||
@ -591,9 +588,6 @@
|
||||
<property name="toolTip">
|
||||
<string>Delete field (Ctrl+L)</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+L</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionAddAttribute">
|
||||
<property name="icon">
|
||||
|
Loading…
x
Reference in New Issue
Block a user