mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
fix shortcuts
This commit is contained in:
parent
d33b539659
commit
8678468998
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@
|
|||||||
.ccls
|
.ccls
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
compile_flags.txt
|
compile_flags.txt
|
||||||
|
.cache
|
||||||
|
.tasks
|
||||||
|
.vimspector.json
|
||||||
|
@ -2169,7 +2169,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
// OpenWithDefaultProgram.
|
// OpenWithDefaultProgram.
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::OpenWithDefaultProgram), this);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::OpenWithDefaultProgram),
|
||||||
|
this,
|
||||||
|
Qt::WidgetWithChildrenShortcut);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
@ -2180,7 +2182,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
// Copy
|
// Copy
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Copy), this, Qt::WidgetWithChildrenShortcut);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Copy),
|
||||||
|
this,
|
||||||
|
Qt::WidgetWithChildrenShortcut);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
@ -2191,7 +2195,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
// Cut
|
// Cut
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Cut), this);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Cut),
|
||||||
|
this,
|
||||||
|
Qt::WidgetWithChildrenShortcut);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
@ -2202,7 +2208,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
// Paste
|
// Paste
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste), this);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste),
|
||||||
|
this,
|
||||||
|
Qt::WidgetWithChildrenShortcut);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
this, &NotebookNodeExplorer::pasteNodesFromClipboard);
|
this, &NotebookNodeExplorer::pasteNodesFromClipboard);
|
||||||
@ -2211,7 +2219,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Properties), this);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Properties),
|
||||||
|
this,
|
||||||
|
Qt::WidgetWithChildrenShortcut);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
@ -2222,7 +2232,7 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
|
|
||||||
const auto &sessionConfig = ConfigMgr::getInst().getSessionConfig();
|
const auto &sessionConfig = ConfigMgr::getInst().getSessionConfig();
|
||||||
for (const auto &pro : sessionConfig.getExternalPrograms()) {
|
for (const auto &pro : sessionConfig.getExternalPrograms()) {
|
||||||
auto shortcut = WidgetUtils::createShortcut(pro.m_shortcut, this);
|
auto shortcut = WidgetUtils::createShortcut(pro.m_shortcut, this, Qt::WidgetWithChildrenShortcut);
|
||||||
const auto &name = pro.m_name;
|
const auto &name = pro.m_name;
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
connect(shortcut, &QShortcut::activated,
|
connect(shortcut, &QShortcut::activated,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user