~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/canvasmode_create.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2010-07-15 12:43:00 UTC
  • mfrom: (0.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100715124300-2u304r2rvy55vpkv
Tags: 1.3.7.dfsg~svn20100715-1
* Upstream svn. update.
* debian/scribus-ng.lintian: Updated overrides.
* debian/control: Updated standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
                return;
233
233
        if (GetItem(&currItem))
234
234
        {
235
 
                newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
236
 
                newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
 
235
                newX = mousePointDoc.x(); //m_view->translateToDoc(m->x(), m->y()).x());
 
236
                newY = mousePointDoc.y(); //m_view->translateToDoc(m->x(), m->y()).y());
237
237
                
238
238
                if (m_doc->DragP)
239
239
                        return;
242
242
        {
243
243
                if ((m_MouseButtonPressed) && (m->buttons() & Qt::LeftButton))
244
244
                {
245
 
                        newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
246
 
                        newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
 
245
                        newX = mousePointDoc.x();
 
246
                        newY = mousePointDoc.y();
247
247
                        if (createObjectMode == modeDrawLine)
248
248
                        {
249
249
                                if (m_doc->useRaster)
253
253
                                }
254
254
                                if (m->modifiers() & Qt::ControlModifier)
255
255
                                {
256
 
                                        QRectF bounds(QPoint(createObjectPos.x(), createObjectPos.y()), QPoint(newX, newY));
 
256
                                        QRectF bounds(QPointF(createObjectPos.x(), createObjectPos.y()), QPointF(newX, newY));
257
257
                                        double newRot = xy2Deg(bounds.width(), bounds.height());
258
258
                                        if (newRot < 0.0)
259
259
                                                newRot += 360;
271
271
                                double nx = np2.x();
272
272
                                double ny = np2.y();
273
273
                                m_doc->ApplyGuides(&nx, &ny);
274
 
                                newX = qRound(nx);
275
 
                                newY = qRound(ny);
 
274
                                // #8959 : suppress qRound here as this prevent drawing line with angle constrain
 
275
                                // precisely and does not allow to stick precisely to grid or guides
 
276
                                newX = /*qRound(*/nx/*)*/;
 
277
                                newY = /*qRound(*/ny/*)*/;
276
278
                        //}
277
279
                        canvasCurrCoord.setXY(newX, newY);
278
280
                        m_view->HaveSelRect = true;