From 35d35ebfec01aa3d74536f799e7cf474f1613da0 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 19 Jul 2013 11:37:34 +0200 Subject: [PATCH 1/8] cleaning before building --- buildDebianPackage.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/buildDebianPackage.sh b/buildDebianPackage.sh index 09690e6f..be70cfd5 100755 --- a/buildDebianPackage.sh +++ b/buildDebianPackage.sh @@ -132,6 +132,14 @@ buildImporter(){ IMPORTER_NAME="OpenBoardImporter" checkDir $IMPORTER_DIR cd ${IMPORTER_DIR} + + rm moc_* + rm -rf debug release + rm *.o + + git reset --hard + git pull + $QMAKE_PATH ${IMPORTER_NAME}.pro make clean make -j4 From 44b4e3fa5ca9591617d89504d43491e43c4238c1 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 19 Jul 2013 11:50:54 +0200 Subject: [PATCH 2/8] removing old file before building the importer --- release.win7.vc9.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index aa5db2b2..22d2fea4 100644 --- a/release.win7.vc9.bat +++ b/release.win7.vc9.bat @@ -44,6 +44,10 @@ IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR set HOME_DIR="%cd%" cd %IMPORTER_PATH% IF EXIST "release" (del "release\*.*" /Q) +IF EXIST "debug" (del "debug\*.*" /Q) +IF EXIST "MakeFile" (del "MakeFile*" /Q) +IF EXIST "MakeFile" (del "MakeFile*" /Q) +IF EXIST "%IMPORTER_NAME%.exe" (del "%IMPORTER_NAME%.exe" /Q) "%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro nmake release cd %HOME_DIR% From bdad6a4ba7f0e3d6332d43ac4871b1406013ed24 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 19 Jul 2013 12:04:26 +0200 Subject: [PATCH 3/8] removed file before building the importer --- release.macx.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release.macx.sh b/release.macx.sh index 1ea9576d..574b23ef 100755 --- a/release.macx.sh +++ b/release.macx.sh @@ -90,6 +90,12 @@ function addImporter { fi cd ${importerDir} + git reset --hard + git pull + rm -rf ${importerName}.app + rm moc_* + rm MakeFile* + rm *.o $QMAKE ${importerName}.pro make -j4 $MACDEPLOYQT ${importerName}.app @@ -227,7 +233,6 @@ $DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME" $DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`" $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications" $DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" -$DMGUTIL --set --x=400 --y=280 "$VOLUME/JournalDesModifications.pdf" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" From abde69b100c78264c83eac078365652da9893ce3 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 19 Jul 2013 13:23:53 +0200 Subject: [PATCH 4/8] release note not more automatically added --- release.macx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.macx.sh b/release.macx.sh index 574b23ef..edd15daf 100755 --- a/release.macx.sh +++ b/release.macx.sh @@ -224,7 +224,7 @@ notify "Creating dmg ..." umount "$VOLUME" 2> /dev/null $DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG" -cp *.pdf "$VOLUME" +#cp *.pdf "$VOLUME" cp -R "$APP" "$VOLUME" ln -s /Applications "$VOLUME" @@ -232,7 +232,7 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn $DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME" $DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`" $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications" -$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" +#$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" From 1a3c8da4a730460c59ddfc774be6cf4fe04d4217 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 19 Jul 2013 14:38:22 +0200 Subject: [PATCH 5/8] upgraded version --- OpenBoard.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBoard.pro b/OpenBoard.pro index f413da0a..60be1ebf 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -11,7 +11,7 @@ CONFIG += debug_and_release \ VERSION_MAJ = 0 VERSION_MIN = 08 VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error -VERSION_PATCH = 01 +VERSION_PATCH = 02 VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = $$replace(VERSION, "\\.r", "") From e08b1f56c979f1bfb4e7d180adb5c5e8adc8a51f Mon Sep 17 00:00:00 2001 From: Didier Clerc Date: Mon, 22 Jul 2013 17:31:35 +0900 Subject: [PATCH 6/8] Fixed a problem with the colors on desktop mode --- src/desktop/UBDesktopAnnotationController.cpp | 12 +++++++++++- src/desktop/UBDesktopAnnotationController.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index 64e49223..9ab923b5 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -91,6 +91,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB mTransparentDrawingView->setStyleSheet(backgroundStyle); mTransparentDrawingScene = new UBGraphicsScene(0, false); + updateColors(); + mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingScene->setDrawingMode(true); @@ -150,7 +152,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB mDesktopEraserPalette->setVisible(false); connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations())); - + connect(UBApplication::boardController, SIGNAL(backgroundChanged()), this, SLOT(updateColors())); + connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(updateColors())); connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased())); connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased())); connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased())); @@ -174,6 +177,13 @@ UBDesktopAnnotationController::~UBDesktopAnnotationController() delete mTransparentDrawingView; } +void UBDesktopAnnotationController::updateColors(){ + if(UBApplication::boardController->activeScene()->isDarkBackground()){ + mTransparentDrawingScene->setBackground(true, false); + }else{ + mTransparentDrawingScene->setBackground(false, false); + } +} UBDesktopPalette* UBDesktopAnnotationController::desktopPalette() { diff --git a/src/desktop/UBDesktopAnnotationController.h b/src/desktop/UBDesktopAnnotationController.h index bb2c8b1d..bca9e19e 100644 --- a/src/desktop/UBDesktopAnnotationController.h +++ b/src/desktop/UBDesktopAnnotationController.h @@ -100,6 +100,7 @@ class UBDesktopAnnotationController : public QObject UBGraphicsScene* mTransparentDrawingScene; private slots: + void updateColors(); void desktopPenActionToggled(bool checked); void desktopMarkerActionToggled(bool checked); void desktopEraserActionToggled(bool checked); From a2a729c8881d8ce1ab4e300f512a2af882c46563 Mon Sep 17 00:00:00 2001 From: Didier Clerc Date: Tue, 23 Jul 2013 16:18:12 +0900 Subject: [PATCH 7/8] Resolved a focus issue on the text item --- src/board/UBBoardController.cpp | 20 -------------------- src/board/UBBoardController.h | 1 - src/domain/UBGraphicsScene.cpp | 1 + 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index ac5e2398..161b0fc5 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -1522,7 +1522,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy, selectionChanged(); updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground()); - updateBackgroundState(); if(documentChange) UBGraphicsTextItem::lastUsedTextColor = QColor(); @@ -1642,8 +1641,6 @@ void UBBoardController::changeBackground(bool isDark, bool isCrossed) mActiveScene->setBackground(isDark, isCrossed); - updateBackgroundState(); - emit backgroundChanged(); } } @@ -1984,22 +1981,6 @@ void UBBoardController::saveViewState() } } - -void UBBoardController::updateBackgroundState() -{ - //adjust background style - QString newBackgroundStyle; - - if (mActiveScene && mActiveScene->isDarkBackground()) - { - newBackgroundStyle ="QWidget {background-color: #0E0E0E}"; - } - else - { - newBackgroundStyle ="QWidget {background-color: #F1F1F1}"; - } -} - void UBBoardController::stylusToolChanged(int tool) { if (UBPlatformUtils::hasVirtualKeyboard() && mPaletteManager->mKeyboardPalette) @@ -2012,7 +1993,6 @@ void UBBoardController::stylusToolChanged(int tool) } } - updateBackgroundState(); } diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h index 8ab9b27e..d6e56421 100644 --- a/src/board/UBBoardController.h +++ b/src/board/UBBoardController.h @@ -299,7 +299,6 @@ class UBBoardController : public UBDocumentContainer void boardViewResized(QResizeEvent* event); void documentWillBeDeleted(UBDocumentProxy* pProxy); void updateBackgroundActionsState(bool isDark, bool isCrossed); - void updateBackgroundState(); void colorPaletteChanged(); void libraryDialogClosed(int ret); void lastWindowClosed(); diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index e80a8561..f3ebd071 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1712,6 +1712,7 @@ void UBGraphicsScene::deselectAllItems() { foreach(QGraphicsItem *gi, selectedItems ()) { + gi->clearFocus(); gi->setSelected(false); // Hide selection frame if (mSelectionFrame) { From 30061212f1dfd624a15858d95034febf8ab554f3 Mon Sep 17 00:00:00 2001 From: Didier Clerc Date: Thu, 25 Jul 2013 16:09:07 +0900 Subject: [PATCH 8/8] Fixed a crash in document mode --- src/domain/UBGraphicsItemUndoCommand.cpp | 3 ++- src/domain/UBGraphicsItemUndoCommand.h | 2 +- src/gui/UBDocumentNavigator.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/domain/UBGraphicsItemUndoCommand.cpp b/src/domain/UBGraphicsItemUndoCommand.cpp index 36cb74d6..1923d7d5 100644 --- a/src/domain/UBGraphicsItemUndoCommand.cpp +++ b/src/domain/UBGraphicsItemUndoCommand.cpp @@ -159,7 +159,7 @@ void UBGraphicsItemUndoCommand::undo() } -void UBGraphicsItemUndoCommand::redo() +/*void UBGraphicsItemUndoCommand::redo() { // the Undo framework calls a redo while appending the undo command. // as we have already plotted the elements, we do not want to do it twice @@ -238,3 +238,4 @@ void UBGraphicsItemUndoCommand::redo() mFirstRedo = false; } } +*/ diff --git a/src/domain/UBGraphicsItemUndoCommand.h b/src/domain/UBGraphicsItemUndoCommand.h index 4e288f37..8e88a24f 100644 --- a/src/domain/UBGraphicsItemUndoCommand.h +++ b/src/domain/UBGraphicsItemUndoCommand.h @@ -52,7 +52,7 @@ class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand protected: virtual void undo(); - virtual void redo(); + //virtual void redo(); private: UBGraphicsScene* mScene; diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index 7f2e26df..1756b2b5 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -142,7 +142,8 @@ void UBDocumentNavigator::onScrollToSelectedPage(int index) } c++; } - centerOn(mSelectedThumbnail); + if(NULL != mSelectedThumbnail) + centerOn(mSelectedThumbnail); } /**