mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-19 20:18:23 -05:00
Make Ctrl+T shortcut to work for "Open tab" in "Execute SQL"
This shortcut was set for the following actions, making it ambiguous: "View > DB Toolbar" and "Open tab" in "Execute SQL". Additionally it was used by QScintilla for transposing lines. Shortcut for "View > DB Toolbar" has been removed, since it's not considered a frequently used action and there are other toolbars without shortcut. The shortcut for QScintilla has been changed to "Ctrl+Shift+Up". The now working shortcut is added to the "Open tab" action's tool-tip for documentation purposes. See issue #1647
This commit is contained in:
@@ -512,6 +512,7 @@ void MainWindow::init()
|
||||
addShortcutsTooltip(ui->buttonRefresh, {shortcutBrowseRefreshF5->key(), shortcutBrowseRefreshCtrlR->key()});
|
||||
addShortcutsTooltip(ui->buttonPrintTable, {shortcutPrint->key()});
|
||||
|
||||
addShortcutsTooltip(ui->actionSqlOpenTab);
|
||||
addShortcutsTooltip(ui->actionSqlPrint);
|
||||
addShortcutsTooltip(ui->actionExecuteSql, {shortcutBrowseRefreshF5->key(), shortcutBrowseRefreshCtrlR->key()});
|
||||
addShortcutsTooltip(ui->actionSqlExecuteLine);
|
||||
|
||||
@@ -1684,9 +1684,6 @@ You can drag SQL statements from the Schema column and drop them into the SQL ed
|
||||
<property name="whatsThis">
|
||||
<string>Shows or hides the Database toolbar.</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+T</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
|
||||
@@ -34,6 +34,10 @@ SqlTextEdit::SqlTextEdit(QWidget* parent) :
|
||||
command = standardCommands()->boundTo(Qt::ControlModifier+Qt::ShiftModifier+Qt::Key_Slash);
|
||||
command->setKey(0);
|
||||
|
||||
// Change command binding for Ctrl+T so it doesn't interfere with "Open tab"
|
||||
command = standardCommands()->boundTo(Qt::ControlModifier+Qt::Key_T);
|
||||
command->setKey(Qt::ControlModifier+Qt::ShiftModifier+Qt::Key_Up);
|
||||
|
||||
QShortcut* shortcutToggleComment = new QShortcut(QKeySequence(tr("Ctrl+/")), this, nullptr, nullptr, Qt::WidgetShortcut);
|
||||
connect(shortcutToggleComment, &QShortcut::activated, this, &SqlTextEdit::toggleBlockComment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user