Revert r5449 and disable r5452 momentary : Load time from elements is

very slow


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5461 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-07-30 15:24:29 +00:00
parent 52e941f0fc
commit 30bee81432
101 changed files with 514 additions and 514 deletions

View File

@@ -296,7 +296,7 @@ ElementContent ElementView::paste(const QDomDocument &xml_document, const QPoint
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) {
m_scene -> clearSelection();
auto *undo_object = new PastePartsCommand(this, content_pasted);
PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
m_scene -> undoStack().push(undo_object);
}
return(content_pasted);
@@ -343,7 +343,7 @@ ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) {
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) {
m_scene -> clearSelection();
auto *undo_object = new PastePartsCommand(this, content_pasted);
PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
undo_object -> setOffset(offset_paste_count_ - 1, old_start_top_left_corner, offset_paste_count_, start_top_left_corner_);
m_scene -> undoStack().push(undo_object);
}
@@ -446,7 +446,7 @@ bool ElementView::event(QEvent *e) {
*/
bool ElementView::gestureEvent(QGestureEvent *event){
if (QGesture *gesture = event->gesture(Qt::PinchGesture)) {
auto *pinch = static_cast<QPinchGesture *>(gesture);
QPinchGesture *pinch = static_cast<QPinchGesture *>(gesture);
if (pinch->changeFlags() & QPinchGesture::ScaleFactorChanged){
qreal value = gesture->property("scaleFactor").toReal();
if (value > 1){
@@ -515,9 +515,9 @@ void ElementView::drawBackground(QPainter *p, const QRectF &r) {
qreal limite_x = r.x() + r.width();
qreal limite_y = r.y() + r.height();
auto g_x = (int)ceil(r.x());
int g_x = (int)ceil(r.x());
while (g_x % drawn_x_grid) ++ g_x;
auto g_y = (int)ceil(r.y());
int g_y = (int)ceil(r.y());
while (g_y % drawn_y_grid) ++ g_y;
for (int gx = g_x ; gx < limite_x ; gx += drawn_x_grid) {