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", "") 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 diff --git a/release.macx.sh b/release.macx.sh index 1ea9576d..edd15daf 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 @@ -218,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" @@ -226,8 +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=400 --y=280 "$VOLUME/JournalDesModifications.pdf" +#$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" 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% diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index b9f3a502..fb6143e0 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -1529,7 +1529,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy, selectionChanged(); updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground()); - updateBackgroundState(); if(documentChange) UBGraphicsTextItem::lastUsedTextColor = QColor(); @@ -1649,8 +1648,6 @@ void UBBoardController::changeBackground(bool isDark, bool isCrossed) mActiveScene->setBackground(isDark, isCrossed); - updateBackgroundState(); - emit backgroundChanged(); } } @@ -1991,22 +1988,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) @@ -2019,7 +2000,6 @@ void UBBoardController::stylusToolChanged(int tool) } } - updateBackgroundState(); } diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h index 93f92419..37b8a75d 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/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); diff --git a/src/domain/UBGraphicsItemUndoCommand.cpp b/src/domain/UBGraphicsItemUndoCommand.cpp index b047d6a5..3d134bce 100644 --- a/src/domain/UBGraphicsItemUndoCommand.cpp +++ b/src/domain/UBGraphicsItemUndoCommand.cpp @@ -157,7 +157,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 @@ -236,3 +236,4 @@ void UBGraphicsItemUndoCommand::redo() mFirstRedo = false; } } +*/ diff --git a/src/domain/UBGraphicsItemUndoCommand.h b/src/domain/UBGraphicsItemUndoCommand.h index 86cde9aa..5b6f881b 100644 --- a/src/domain/UBGraphicsItemUndoCommand.h +++ b/src/domain/UBGraphicsItemUndoCommand.h @@ -52,7 +52,7 @@ class UBGraphicsItemUndoCommand : public UBUndoCommand protected: virtual void undo(); - virtual void redo(); + //virtual void redo(); private: UBGraphicsScene* mScene; diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index b0d0b158..dc008a6b 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) { 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); } /**