Compilation error fix

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent 644c513352
commit e253916349
  1. 26
      src/domain/UBGraphicsScene.cpp

@ -60,7 +60,7 @@
#include "UBGraphicsStroke.h" #include "UBGraphicsStroke.h"
#include "core/memcheck.h" #include "core/memcheck.h"
#include "qtlogger.h" //#include "qtlogger.h"
qreal UBGraphicsScene::backgroundLayerStart = -20000000.0; qreal UBGraphicsScene::backgroundLayerStart = -20000000.0;
qreal UBGraphicsScene::objectLayerStart = -10000000.0; qreal UBGraphicsScene::objectLayerStart = -10000000.0;
@ -140,8 +140,8 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent)
} }
connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedProcessing())); connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedProcessing()));
QtLogger::logger().start("/home/ilia/Documents/tmp/2/log.txt"); //QtLogger::logger().start("/home/ilia/Documents/tmp/2/log.txt");
QtLogger::logger().finish(); //QtLogger::logger().finish();
} }
UBGraphicsScene::~UBGraphicsScene() UBGraphicsScene::~UBGraphicsScene()
@ -155,15 +155,15 @@ UBGraphicsScene::~UBGraphicsScene()
void UBGraphicsScene::selectionChangedProcessing() void UBGraphicsScene::selectionChangedProcessing()
{ {
QtLogger::logger().start("/home/ilia/Documents/tmp/2/log.txt"); //QtLogger::logger().start("/home/ilia/Documents/tmp/2/log.txt");
QtLogger::logger() << "selection processing started\n" << endl; //QtLogger::logger() << "selection processing started\n" << endl;
if (selectedItems().count()) if (selectedItems().count())
UBApplication::showMessage("ZValue is " + QString::number(selectedItems().first()->zValue(), 'f')); UBApplication::showMessage("ZValue is " + QString::number(selectedItems().first()->zValue(), 'f'));
QList<QGraphicsItem *> allItemsList = items(); QList<QGraphicsItem *> allItemsList = items();
QtLogger::logger() << "=====all items searching...======" << endl; //QtLogger::logger() << "=====all items searching...======" << endl;
qreal maxZ = 0.; qreal maxZ = 0.;
for( int i = 0; i < allItemsList.size(); i++ ) for( int i = 0; i < allItemsList.size(); i++ )
{ {
@ -179,24 +179,24 @@ void UBGraphicsScene::selectionChangedProcessing()
nextItem->setZValue(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal()); nextItem->setZValue(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal());
// nextItem->setZValue(qreal(1)); // nextItem->setZValue(qreal(1));
QtLogger::logger() << "own Z " << QString::number(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal(), 'f') //QtLogger::logger() << "own Z " << QString::number(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal(), 'f')
<< " next Z " << QString::number(nextItem->zValue(), 'f')<< endl; // << " next Z " << QString::number(nextItem->zValue(), 'f')<< endl;
// qDebug() << QString(" %1 ").arg(i) << QString(" %1 ").arg(zValue); // qDebug() << QString(" %1 ").arg(i) << QString(" %1 ").arg(zValue);
} }
QList<QGraphicsItem *> selItemsList = selectedItems(); QList<QGraphicsItem *> selItemsList = selectedItems();
QtLogger::logger() << "=====selected items searching...======" << endl; //QtLogger::logger() << "=====selected items searching...======" << endl;
// QGraphicsItem *nextItem; // QGraphicsItem *nextItem;
for( int i = 0; i < selItemsList.size(); i++ ) for( int i = 0; i < selItemsList.size(); i++ )
{ {
QGraphicsItem *nextItem = selItemsList.at(i); QGraphicsItem *nextItem = selItemsList.at(i);
QtLogger::logger() << "own Z " << QString::number(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal(), 'f') //QtLogger::logger() << "own Z " << QString::number(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal(), 'f')
<< " next Z " << QString::number(nextItem->zValue(), 'f')<< endl; // << " next Z " << QString::number(nextItem->zValue(), 'f')<< endl;
// qreal zValue = nextItem->zValue(); // qreal zValue = nextItem->zValue();
nextItem->setZValue(maxZ + 0.0001); nextItem->setZValue(maxZ + 0.0001);
// qDebug() << QString(" >>> %1 <<< ").arg(i) << QString(" >>> %1 <<< ").arg(zValue); // qDebug() << QString(" >>> %1 <<< ").arg(i) << QString(" >>> %1 <<< ").arg(zValue);
} }
QtLogger::logger() << "\nselection processing finished" << endl; //QtLogger::logger() << "\nselection processing finished" << endl;
QtLogger::logger().finish(); //QtLogger::logger().finish();
} }
// MARK: - // MARK: -

Loading…
Cancel
Save