From fd9fc41990a2dd4dc80118c5fac096220b7eeadc Mon Sep 17 00:00:00 2001 From: Ivan Ilin Date: Mon, 16 Jan 2012 19:20:35 +0200 Subject: [PATCH] Sankore-341 Sankore-363 Sankore-365 --- src/core/UBSettings.cpp | 1 + src/core/UBSettings.h | 2 ++ src/domain/UBGraphicsScene.cpp | 2 +- src/gui/UBDocumentThumbnailWidget.cpp | 2 ++ src/gui/UBKeyboardPalette.cpp | 4 +++- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 7bb10c73..6ddae349 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -363,6 +363,7 @@ void UBSettings::init() intranetPodcastPublishingUrl = new UBSetting(this, "IntranetPodcast", "PublishingUrl", ""); intranetPodcastAuthor = new UBSetting(this, "IntranetPodcast", "Author", ""); + KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0); } diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index bf19852c..a1c0affd 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -318,6 +318,8 @@ class UBSettings : public QObject static int libPaletteWidth; */ + UBSetting* KeyboardLocale; + public slots: void setPenWidthIndex(int index); diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 6887e397..95b05d01 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1938,7 +1938,7 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent) QList si = selectedItems(); - if (si.size() > 0 && !keyEvent->isAccepted()) + if ((si.size() > 0) && (keyEvent->isAccepted())) { #ifdef Q_OS_MAC if (keyEvent->key() == Qt::Key_Backspace) diff --git a/src/gui/UBDocumentThumbnailWidget.cpp b/src/gui/UBDocumentThumbnailWidget.cpp index 637f4554..788ae05d 100644 --- a/src/gui/UBDocumentThumbnailWidget.cpp +++ b/src/gui/UBDocumentThumbnailWidget.cpp @@ -254,4 +254,6 @@ void UBDocumentThumbnailWidget::hightlightItem(int index) if (thumbnail) thumbnail->highlight(); } + + selectItemAt(index); } diff --git a/src/gui/UBKeyboardPalette.cpp b/src/gui/UBKeyboardPalette.cpp index 9c76cc9b..d537f308 100644 --- a/src/gui/UBKeyboardPalette.cpp +++ b/src/gui/UBKeyboardPalette.cpp @@ -54,7 +54,7 @@ UBKeyboardPalette::UBKeyboardPalette(QWidget *parent) createCtrlButtons(); - nCurrentLocale = 0; + nCurrentLocale = UBSettings::settings()->KeyboardLocale->get().toInt(); setInput(locales[nCurrentLocale]); setContentsMargins( 22, 22, 22, 22 ); @@ -166,6 +166,8 @@ void UBKeyboardPalette::setLocale(int nLocale) setInput(locales[nCurrentLocale]); onLocaleChanged(locales[nCurrentLocale]); update(); + + UBSettings::settings()->KeyboardLocale->set(nCurrentLocale); } emit localeChanged(nLocale); }