fixed issue with lost of transform for strokes

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent f4ccb26909
commit ecf7c7b75d
  1. 18
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 18
      src/core/UBApplicationController.cpp

@ -574,7 +574,8 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
else else
group = mStrokesList.value(parentId); group = mStrokesList.value(parentId);
polygonItem->setTransform(group->transform()); if(polygonItem->transform().isIdentity())
polygonItem->setTransform(group->transform());
group->addToGroup(polygonItem); group->addToGroup(polygonItem);
polygonItem->setStrokesGroup(group); polygonItem->setStrokesGroup(group);
polygonItem->setStroke(currentStroke); polygonItem->setStroke(currentStroke);
@ -604,7 +605,8 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
else else
group = mStrokesList.value(parentId); group = mStrokesList.value(parentId);
polygonItem->setTransform(group->transform()); if(polygonItem->transform().isIdentity())
polygonItem->setTransform(group->transform());
group->addToGroup(polygonItem); group->addToGroup(polygonItem);
polygonItem->setStrokesGroup(group); polygonItem->setStrokesGroup(group);
polygonItem->setStroke(currentStroke); polygonItem->setStroke(currentStroke);
@ -1700,18 +1702,6 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol
if (!svgPoints.isNull()) if (!svgPoints.isNull())
{ {
// int lenght = strlen(svgPoints.toUtf8().constData()) + 1;
// char pippo[lenght];
// memcpy(pippo,svgPoints.toUtf8().constData(),lenght);
// char* localPosition = (char*) &pippo[0];
// do{
// float x = atof(localPosition);
// localPosition = strchr(localPosition,',') + 1;
// float y = atof(localPosition);
// localPosition = strchrnul(localPosition,' ');
// polygon << QPointF(x,y);
// }while(localPosition - pippo > lenght - 5);
QStringList ts = svgPoints.toString().split(QLatin1Char(' '), QStringList ts = svgPoints.toString().split(QLatin1Char(' '),
QString::SkipEmptyParts); QString::SkipEmptyParts);

@ -68,9 +68,9 @@
#include "core/memcheck.h" #include "core/memcheck.h"
UBApplicationController::UBApplicationController(UBBoardView *pControlView, UBApplicationController::UBApplicationController(UBBoardView *pControlView,
UBBoardView *pDisplayView, UBBoardView *pDisplayView,
UBMainWindow* pMainWindow, UBMainWindow* pMainWindow,
QObject* parent, QObject* parent,
UBRightPalette* rightPalette) UBRightPalette* rightPalette)
: QObject(parent) : QObject(parent)
@ -371,7 +371,7 @@ void UBApplicationController::showBoard()
UBPlatformUtils::setDesktopMode(false); UBPlatformUtils::setDesktopMode(false);
mUninoteController->hideWindow(); mUninoteController->hideWindow();
mMainWindow->show(); mMainWindow->show();
emit mainModeChanged(Board); emit mainModeChanged(Board);
@ -543,12 +543,12 @@ void UBApplicationController::showSankoreEditor()
void UBApplicationController::checkUpdate() void UBApplicationController::checkUpdate()
{ {
if(mHttp) // if(mHttp)
delete mHttp; // delete mHttp;
QUrl url("http://ftp.open-sankore.org/update.json"); // QUrl url("http://ftp.open-sankore.org/update.json");
mHttp = new QHttp(url.host()); // mHttp = new QHttp(url.host());
connect(mHttp, SIGNAL(requestFinished(int,bool)), this, SLOT(updateRequestFinished(int,bool))); // connect(mHttp, SIGNAL(requestFinished(int,bool)), this, SLOT(updateRequestFinished(int,bool)));
mHttp->get(url.path()); // mHttp->get(url.path());
} }
void UBApplicationController::updateRequestFinished(int id, bool error) void UBApplicationController::updateRequestFinished(int id, bool error)

Loading…
Cancel
Save