From c622c389209e90051cf6562ef3a188e444e26793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Fri, 16 Nov 2018 16:33:07 +0100 Subject: [PATCH] fixed shortcut issue and focus error on OSX --- src/document/UBDocumentController.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 0267a72c..8c036f0f 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -1924,7 +1924,7 @@ void UBDocumentController::setupViews() } } -#ifdef Q_WS_MAC +#ifdef Q_OS_OSX mMainWindow->actionDelete->setShortcut(QKeySequence(Qt::Key_Backspace)); #endif @@ -3019,10 +3019,12 @@ void UBDocumentController::focusChanged(QWidget *old, QWidget *current) if (current == mDocumentUI->thumbnailWidget) { - if (mDocumentUI->thumbnailWidget->selectedItems().count() > 0) - mSelectionType = Page; - else - mSelectionType = None; + /* + if (mDocumentUI->thumbnailWidget->selectedItems().count() > 0) + mSelectionType = Page; + else + mSelectionType = None; + */ } else if (current == mDocumentUI->documentTreeView) { @@ -3080,6 +3082,10 @@ void UBDocumentController::updateActions() } //N/C - NNE - 20140408 : END +#ifdef Q_OS_OSX + mMainWindow->actionDelete->setShortcut(QKeySequence(Qt::Key_Backspace)); +#endif + QModelIndex selectedIndex = firstSelectedTreeIndex(); UBDocumentProxy *selectedProxy = docModel->proxyData(selectedIndex); int pageCount = -1;