Fixed issue 769

preferencesAboutTextFull
shibakaneki 13 years ago
parent f2b92ee42e
commit bb561c3869
  1. 4
      src/board/UBDrawingController.cpp
  2. 5
      src/board/UBDrawingController.h
  3. 2
      src/core/UBApplicationController.cpp
  4. 2
      src/desktop/UBDesktopAnnotationController.cpp
  5. 6
      src/domain/UBGraphicsScene.cpp

@ -46,7 +46,7 @@ UBDrawingController::UBDrawingController(QObject * parent)
, mStylusTool((UBStylusTool::Enum)-1)
, mLatestDrawingTool((UBStylusTool::Enum)-1)
, mDrawingMode(DRAWING_MODE)
, mIsDesktopMode(false)
{
connect(UBSettings::settings(), SIGNAL(colorContextChanged()), this, SIGNAL(colorPaletteChanged()));
@ -107,7 +107,7 @@ void UBDrawingController::setStylusTool(int tool)
mStylusTool = (UBStylusTool::Enum)tool;
if(eDrawingMode_Vector == DRAWING_MODE){
if(eDrawingMode_Vector == DRAWING_MODE && !mIsDesktopMode){
mDrawingMode = eDrawingMode_Vector;
}

@ -61,6 +61,10 @@ class UBDrawingController : public QObject
UBAbstractDrawRuler* mActiveRuler;
void setInDestopMode(bool mode){
mIsDesktopMode = mode;
}
public slots:
void setStylusTool(int tool);
@ -79,6 +83,7 @@ class UBDrawingController : public QObject
UBStylusTool::Enum mStylusTool;
UBStylusTool::Enum mLatestDrawingTool;
eDrawingMode mDrawingMode;
bool mIsDesktopMode;
static UBDrawingController* sDrawingController;

@ -69,7 +69,6 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, UBBo
, mCheckingForUpdates(false)
, mIsShowingDesktop(false)
, mHttp(0)
{
mDisplayManager = new UBDisplayManager(this);
@ -457,6 +456,7 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
UBPlatformUtils::bringPreviousProcessToFront();
}
UBDrawingController::drawingController()->setInDestopMode(true);
UBDrawingController::drawingController()->setDrawingMode(eDrawingMode_Artistic);
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
}

@ -385,6 +385,8 @@ void UBDesktopAnnotationController::goToUniboard()
hideWindow();
UBPlatformUtils::setDesktopMode(false);
UBDrawingController::drawingController()->setInDestopMode(false);
UBDrawingController::drawingController()->setDrawingMode(eDrawingMode_Vector);
emit restoreUniboard();
}

@ -558,7 +558,7 @@ bool UBGraphicsScene::inputDeviceRelease()
}
}else if (mCurrentStroke)
{
if(eDrawingMode_Vector == DRAWING_MODE){
if(eDrawingMode_Vector == UBDrawingController::drawingController()->drawingMode()){
UBGraphicsStrokesGroup* pStrokes = new UBGraphicsStrokesGroup();
// Remove the strokes that were just drawn here and replace them by a stroke item
@ -902,7 +902,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
}
}
if(eDrawingMode_Vector == DRAWING_MODE){
if(eDrawingMode_Vector == UBDrawingController::drawingController()->drawingMode()){
foreach(QGraphicsItem* item, toBeRemovedItems){
UBGraphicsPolygonItem* poly = dynamic_cast<UBGraphicsPolygonItem*>(item);
if(NULL != poly){
@ -920,7 +920,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
mRemovedItems += toBeRemovedItems;
}
if(eDrawingMode_Vector == DRAWING_MODE){
if(eDrawingMode_Vector == UBDrawingController::drawingController()->drawingMode()){
foreach(QGraphicsItem* item, toBeAddedItems){
UBGraphicsPolygonItem* poly = dynamic_cast<UBGraphicsPolygonItem*>(item);
if(NULL != poly && NULL != poly->strokesGroup()){

Loading…
Cancel
Save