r23144 by jghali - Cleanup code of a few canvas mode by removing unused members and renaning some class members
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 21 04:24:54 UTC 2019
Author: jghali
Date: Wed Aug 21 04:24:54 2019
New Revision: 23144
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23144
Log:
Cleanup code of a few canvas mode by removing unused members and renaning some class members
Modified:
trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
trunk/Scribus/scribus/canvasmode_drawfreehand.h
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/canvasmode_framelinks.h
trunk/Scribus/scribus/canvasmode_magnifier.cpp
trunk/Scribus/scribus/canvasmode_magnifier.h
Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp Wed Aug 21 04:24:54 2019
@@ -44,10 +44,8 @@
CalligraphicMode::CalligraphicMode(ScribusView* view) : CanvasMode(view)
{
- Mxp = Myp = -1;
- Dxp = Dyp = -1;
- SeRx = SeRy = -1;
- m_MouseButtonPressed = false;
+ m_xp = m_yp = -1;
+ m_mouseButtonPressed = false;
}
@@ -64,7 +62,7 @@
void CalligraphicMode::enterEvent(QEvent *)
{
- if (!m_MouseButtonPressed)
+ if (!m_mouseButtonPressed)
{
setModeCursor();
}
@@ -78,9 +76,8 @@
void CalligraphicMode::activate(bool flag)
{
- Mxp = Myp = -1;
- Dxp = Dyp = -1;
- m_MouseButtonPressed = false;
+ m_xp = m_yp = -1;
+ m_mouseButtonPressed = false;
setModeCursor();
}
@@ -92,7 +89,7 @@
void CalligraphicMode::mouseDoubleClickEvent(QMouseEvent *m)
{
m->accept();
- m_MouseButtonPressed = false;
+ m_mouseButtonPressed = false;
m_canvas->resetRenderMode();
mousePressEvent(m);
}
@@ -112,27 +109,27 @@
if (commonMouseMove(m))
return;
- if (m_MouseButtonPressed && (m_doc->appMode == modeDrawCalligraphicLine))
+ if (m_mouseButtonPressed && (m_doc->appMode == modeDrawCalligraphicLine))
{
double newXF = mousePointDoc.x(); //m_view->translateToDoc(m->x(), m->y()).x();
double newYF = mousePointDoc.y(); //m_view->translateToDoc(m->x(), m->y()).y();
- if (!RecordP.empty())
- {
- if (FPoint(newXF, newYF) != RecordP.point(RecordP.size()-1))
- RecordP.addPoint(FPoint(newXF, newYF));
+ if (!m_poly.empty())
+ {
+ if (FPoint(newXF, newYF) != m_poly.point(m_poly.size()-1))
+ m_poly.addPoint(FPoint(newXF, newYF));
}
else
- RecordP.addPoint(FPoint(newXF, newYF));
+ m_poly.addPoint(FPoint(newXF, newYF));
QPolygon& redrawPolygon(m_canvas->newRedrawPolygon());
double mx = sin(m_doc->itemToolPrefs().calligraphicPenAngle / 180.0 * M_PI) * (m_doc->itemToolPrefs().calligraphicPenWidth / 2.0);
double my = cos(m_doc->itemToolPrefs().calligraphicPenAngle / 180.0 * M_PI) * (m_doc->itemToolPrefs().calligraphicPenWidth / 2.0);
- for (int px = 0; px < RecordP.size()-1; ++px)
- {
- FPoint clp = RecordP.point(px);
+ for (int px = 0; px < m_poly.size()-1; ++px)
+ {
+ FPoint clp = m_poly.point(px);
redrawPolygon.append(QPoint(qRound(clp.x() - mx), qRound(clp.y() - my)));
redrawPolygon.prepend(QPoint(qRound(clp.x() + mx), qRound(clp.y() + my)));
}
- redrawPolygon.append(QPoint(qRound(RecordP.point(RecordP.size()-1).x() + mx), qRound(RecordP.point(RecordP.size()-1).y() + my)));
+ redrawPolygon.append(QPoint(qRound(m_poly.point(m_poly.size()-1).x() + mx), qRound(m_poly.point(m_poly.size()-1).y() + my)));
//FIXME
m_canvas->m_viewMode.operItemResizing = true;
QRect bRect = m_canvas->redrawPolygon().boundingRect();
@@ -148,7 +145,7 @@
if (m_doc->DragP)
return;
- if ((!m_MouseButtonPressed) && (m_doc->appMode != modeDrawBezierLine))
+ if ((!m_mouseButtonPressed) && (m_doc->appMode != modeDrawBezierLine))
{
if (m_doc->m_Selection->isMultipleSelection())
{
@@ -166,13 +163,11 @@
}
else
{
- if ((m_MouseButtonPressed) && (m->buttons() & Qt::LeftButton))
+ if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
{
newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
- SeRx = newX;
- SeRy = newY;
- QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
+ QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
@@ -189,21 +184,22 @@
FPoint npf, npf2;
// QRect tx;
QTransform pm;
- m_MouseButtonPressed = true;
+
+ m_mouseButtonPressed = true;
m_view->HaveSelRect = false;
m_doc->DragP = false;
m_doc->leaveDrag = false;
+
m->accept();
m_view->registerMousePress(m->globalPos());
- Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
- Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+
+ m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
+ m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
// QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
- Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
- Mxp = qRound(Rxp);
- Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
- Myp = qRound(Ryp);
- SeRx = Mxp;
- SeRy = Myp;
+ Rxp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).x();
+ m_xp = qRound(Rxp);
+ Ryp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).y();
+ m_yp = qRound(Ryp);
if (m->button() == Qt::MidButton)
{
m_view->MidButt = true;
@@ -216,12 +212,10 @@
m_view->stopGesture();
return;
}
- RecordP.resize(0);
+ m_poly.resize(0);
m_view->Deselect(false);
- Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
- Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
- SeRx = Mxp;
- SeRy = Myp;
+ m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
+ m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
m_canvas->setRenderModeFillBuffer();
undoManager->setUndoEnabled(false);
}
@@ -232,27 +226,27 @@
{
undoManager->setUndoEnabled(true);
PageItem *currItem;
- m_MouseButtonPressed = false;
+ m_mouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
if (m_doc->appMode == modeDrawCalligraphicLine)
{
- if (RecordP.size() > 1)
+ if (m_poly.size() > 1)
{
UndoTransaction createTransaction;
if (UndoManager::undoEnabled())
createTransaction = UndoManager::instance()->beginTransaction();
- uint z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, Mxp, Myp, 1, 1, m_doc->itemToolPrefs().calligraphicPenLineWidth, m_doc->itemToolPrefs().calligraphicPenFillColor, m_doc->itemToolPrefs().calligraphicPenLineColor);
+ uint z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, m_xp, m_yp, 1, 1, m_doc->itemToolPrefs().calligraphicPenLineWidth, m_doc->itemToolPrefs().calligraphicPenFillColor, m_doc->itemToolPrefs().calligraphicPenLineColor);
currItem = m_doc->Items->at(z);
currItem->PoLine.resize(0);
QList<QPointF> clipU;
QList<QPointF> clipL;
double mx = sin(m_doc->itemToolPrefs().calligraphicPenAngle / 180.0 * M_PI) * (m_doc->itemToolPrefs().calligraphicPenWidth / 2.0);
double my = cos(m_doc->itemToolPrefs().calligraphicPenAngle / 180.0 * M_PI) * (m_doc->itemToolPrefs().calligraphicPenWidth / 2.0);
- for (int px = 0; px < RecordP.size()-1; ++px)
+ for (int px = 0; px < m_poly.size()-1; ++px)
{
- FPoint clp = RecordP.point(px);
+ FPoint clp = m_poly.point(px);
clipU.append(QPointF(clp.x() - mx, clp.y() - my));
clipL.prepend(QPointF(clp.x() + mx, clp.y() + my));
}
@@ -330,16 +324,16 @@
void CalligraphicMode::selectPage(QMouseEvent *m)
{
- m_MouseButtonPressed = true;
+ m_mouseButtonPressed = true;
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
- Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
- Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+ m_xp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
+ m_yp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
// QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
m_doc->nodeEdit.deselect();
m_view->Deselect(false);
if (!m_doc->masterPageMode())
{
- int i = m_doc->OnPage(Mxp, Myp);
+ int i = m_doc->OnPage(m_xp, m_yp);
if (i!=-1)
{
uint docCurrPageNo=m_doc->currentPageNumber();
Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.h (original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.h Wed Aug 21 04:24:54 2019
@@ -50,10 +50,9 @@
inline bool GetItem(PageItem** pi);
void selectPage(QMouseEvent *m);
- bool m_MouseButtonPressed;
- double Mxp, Myp, Dxp, Dyp;
- double SeRx, SeRy;
- FPointArray RecordP;
+ bool m_mouseButtonPressed;
+ double m_xp, m_yp;
+ FPointArray m_poly;
};
Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp Wed Aug 21 04:24:54 2019
@@ -41,11 +41,8 @@
FreehandMode::FreehandMode(ScribusView* view) : CanvasMode(view)
{
- Mxp = Myp = -1;
- Dxp = Dyp = -1;
- SeRx = SeRy = -1;
- MoveGX = MoveGY = false;
- m_MouseButtonPressed = false;
+ m_xp = m_yp = -1;
+ m_mouseButtonPressed = false;
}
void FreehandMode::drawControls(QPainter* p)
@@ -61,7 +58,7 @@
void FreehandMode::enterEvent(QEvent *)
{
- if (!m_MouseButtonPressed)
+ if (!m_mouseButtonPressed)
{
setModeCursor();
}
@@ -75,10 +72,8 @@
void FreehandMode::activate(bool flag)
{
- Mxp = Myp = -1;
- Dxp = Dyp = -1;
- MoveGX = MoveGY = false;
- m_MouseButtonPressed = false;
+ m_xp = m_yp = -1;
+ m_mouseButtonPressed = false;
setModeCursor();
}
@@ -90,7 +85,7 @@
void FreehandMode::mouseDoubleClickEvent(QMouseEvent *m)
{
m->accept();
- m_MouseButtonPressed = false;
+ m_mouseButtonPressed = false;
m_canvas->resetRenderMode();
mousePressEvent(m);
}
@@ -107,21 +102,21 @@
m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
if (commonMouseMove(m))
return;
- if (m_MouseButtonPressed && (m_doc->appMode == modeDrawFreehandLine))
+ if (m_mouseButtonPressed && (m_doc->appMode == modeDrawFreehandLine))
{
double newXF = mousePointDoc.x(); //m_view->translateToDoc(m->x(), m->y()).x();
double newYF = mousePointDoc.y(); //m_view->translateToDoc(m->x(), m->y()).y();
- if (!RecordP.empty())
- {
- if (FPoint(newXF, newYF) != RecordP.point(RecordP.size()-1))
- RecordP.addPoint(FPoint(newXF, newYF));
+ if (!m_poly.empty())
+ {
+ if (FPoint(newXF, newYF) != m_poly.point(m_poly.size()-1))
+ m_poly.addPoint(FPoint(newXF, newYF));
}
else
- RecordP.addPoint(FPoint(newXF, newYF));
+ m_poly.addPoint(FPoint(newXF, newYF));
QPolygon& redrawPolygon(m_canvas->newRedrawPolygon());
- for (int pp = 0; pp < RecordP.size(); pp++)
- {
- redrawPolygon << RecordP.pointQ(pp);
+ for (int pp = 0; pp < m_poly.size(); pp++)
+ {
+ redrawPolygon << m_poly.pointQ(pp);
}
m_canvas->m_viewMode.operItemResizing = true;
QRect bRect = m_canvas->redrawPolygon().boundingRect();
@@ -136,7 +131,7 @@
if (m_doc->DragP)
return;
- if ((!m_MouseButtonPressed) && (m_doc->appMode != modeDrawBezierLine))
+ if ((!m_mouseButtonPressed) && (m_doc->appMode != modeDrawBezierLine))
{
if (m_doc->m_Selection->isMultipleSelection())
{
@@ -154,13 +149,11 @@
}
else
{
- if ((m_MouseButtonPressed) && (m->buttons() & Qt::LeftButton))
+ if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
{
newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
- SeRx = newX;
- SeRy = newY;
- QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
+ QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
@@ -177,22 +170,19 @@
FPoint npf, npf2;
// QRect tx;
QTransform pm;
- m_MouseButtonPressed = true;
+ m_mouseButtonPressed = true;
m_view->HaveSelRect = false;
m_doc->DragP = false;
m_doc->leaveDrag = false;
- MoveGX = MoveGY = false;
m->accept();
m_view->registerMousePress(m->globalPos());
- Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
- Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+ m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
+ m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
// QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
- Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
- Mxp = qRound(Rxp);
- Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
- Myp = qRound(Ryp);
- SeRx = Mxp;
- SeRy = Myp;
+ Rxp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).x();
+ m_xp = qRound(Rxp);
+ Ryp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).y();
+ m_yp = qRound(Ryp);
if (m->button() == Qt::MidButton)
{
m_view->MidButt = true;
@@ -205,12 +195,10 @@
m_view->stopGesture();
return;
}
- RecordP.resize(0);
+ m_poly.resize(0);
m_view->Deselect(false);
- Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
- Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
- SeRx = Mxp;
- SeRy = Myp;
+ m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
+ m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
m_canvas->setRenderModeFillBuffer();
undoManager->setUndoEnabled(false);
}
@@ -221,23 +209,23 @@
{
undoManager->setUndoEnabled(true);
PageItem *currItem;
- m_MouseButtonPressed = false;
+ m_mouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
if (m_doc->appMode == modeDrawFreehandLine)
{
- if (RecordP.size() > 1)
+ if (m_poly.size() > 1)
{
UndoTransaction createTransaction(UndoManager::instance()->beginTransaction());
- uint z = m_doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, Mxp, Myp, 1, 1, m_doc->itemToolPrefs().lineWidth, CommonStrings::None, m_doc->itemToolPrefs().lineColor);
+ uint z = m_doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, m_xp, m_yp, 1, 1, m_doc->itemToolPrefs().lineWidth, CommonStrings::None, m_doc->itemToolPrefs().lineColor);
currItem = m_doc->Items->at(z);
currItem->PoLine.resize(0);
if (m->modifiers() & Qt::ControlModifier)
{
QList<QPointF> clip;
- for (int px = 0; px < RecordP.size()-1; ++px)
+ for (int px = 0; px < m_poly.size()-1; ++px)
{
- FPoint clp = RecordP.point(px);
+ FPoint clp = m_poly.point(px);
clip.append(QPointF(clp.x(), clp.y()));
}
QPainterPath pp = bezierFit(clip, 5.0);
@@ -245,17 +233,17 @@
}
else
{
- currItem->PoLine.addPoint(RecordP.point(0));
- currItem->PoLine.addPoint(RecordP.point(0));
- for (int px = 1; px < RecordP.size()-1; ++px)
+ currItem->PoLine.addPoint(m_poly.point(0));
+ currItem->PoLine.addPoint(m_poly.point(0));
+ for (int px = 1; px < m_poly.size()-1; ++px)
{
- currItem->PoLine.addPoint(RecordP.point(px));
- currItem->PoLine.addPoint(RecordP.point(px));
- currItem->PoLine.addPoint(RecordP.point(px));
- currItem->PoLine.addPoint(RecordP.point(px));
+ currItem->PoLine.addPoint(m_poly.point(px));
+ currItem->PoLine.addPoint(m_poly.point(px));
+ currItem->PoLine.addPoint(m_poly.point(px));
+ currItem->PoLine.addPoint(m_poly.point(px));
}
- currItem->PoLine.addPoint(RecordP.point(RecordP.size()-1));
- currItem->PoLine.addPoint(RecordP.point(RecordP.size()-1));
+ currItem->PoLine.addPoint(m_poly.point(m_poly.size()-1));
+ currItem->PoLine.addPoint(m_poly.point(m_poly.size()-1));
}
FPoint tp2(getMinClipF(&currItem->PoLine));
currItem->setXYPos(tp2.x(), tp2.y(), true);
@@ -320,16 +308,16 @@
void FreehandMode::selectPage(QMouseEvent *m)
{
- m_MouseButtonPressed = true;
+ m_mouseButtonPressed = true;
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
- Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
- Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+ m_xp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
+ m_yp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
// QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
m_doc->nodeEdit.deselect();
m_view->Deselect(false);
if (!m_doc->masterPageMode())
{
- int i = m_doc->OnPage(Mxp, Myp);
+ int i = m_doc->OnPage(m_xp, m_yp);
if (i!=-1)
{
uint docCurrPageNo=m_doc->currentPageNumber();
Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.h (original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.h Wed Aug 21 04:24:54 2019
@@ -50,11 +50,9 @@
inline bool GetItem(PageItem** pi);
void selectPage(QMouseEvent *m);
- bool m_MouseButtonPressed;
- double Mxp, Myp, Dxp, Dyp;
- double SeRx, SeRy;
- bool MoveGX, MoveGY;
- FPointArray RecordP;
+ bool m_mouseButtonPressed;
+ double m_xp, m_yp;
+ FPointArray m_poly;
};
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Wed Aug 21 04:24:54 2019
@@ -55,7 +55,6 @@
CanvasMode_FrameLinks::CanvasMode_FrameLinks(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW)
{
m_Mxp = m_Myp = -1;
- m_Dxp = m_Dyp = -1;
m_frameResizeHandle = -1;
}
@@ -116,7 +115,6 @@
m_canvas->m_viewMode.operItemResizing = false;
m_view->MidButt = false;
m_Mxp = m_Myp = -1;
- m_Dxp = m_Dyp = -1;
m_frameResizeHandle = -1;
setModeCursor();
if (fromGesture)
@@ -149,7 +147,7 @@
return;
if ((m_canvas->m_viewMode.m_MouseButtonPressed) && (m->buttons() & Qt::LeftButton))
{
- QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(m_Dxp, m_Dyp) : QPointF(m_Mxp, m_Myp));
+ QPoint startP = m_canvas->canvasToGlobal(QPointF(m_Mxp, m_Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
Modified: trunk/Scribus/scribus/canvasmode_framelinks.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_framelinks.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.h (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.h Wed Aug 21 04:24:54 2019
@@ -64,7 +64,7 @@
void createContextMenu(PageItem *currItem, double mx, double my);
int m_frameResizeHandle;
- double m_Mxp, m_Myp, m_Dxp, m_Dyp;
+ double m_Mxp, m_Myp;
ScribusMainWindow* m_ScMW;
};
Modified: trunk/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.cpp Wed Aug 21 04:24:54 2019
@@ -54,8 +54,6 @@
CanvasMode_Magnifier::CanvasMode_Magnifier(ScribusView* view) : CanvasMode(view)
{
m_Mxp = m_Myp = -1;
- m_Dxp = m_Dyp = -1;
- m_SeRx = m_SeRy = -1;
m_lastPosWasOverGuide = false;
}
@@ -89,7 +87,6 @@
m_canvas->m_viewMode.operItemResizing = false;
m_view->MidButt = false;
m_Mxp = m_Myp = -1;
- m_Dxp = m_Dyp = -1;
setModeCursor();
if (fromGesture)
{
@@ -127,7 +124,7 @@
newY = qRound(m_Myp + ((m_SeRx - m_Mxp) * m_view->visibleHeight()) / m_view->visibleWidth());
m_SeRx = newX;
m_SeRy = newY;
- QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(m_Dxp, m_Dyp) : QPointF(m_Mxp, m_Myp));
+ QPoint startP = m_canvas->canvasToGlobal(QPointF(m_Mxp, m_Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
Modified: trunk/Scribus/scribus/canvasmode_magnifier.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23144&path=/trunk/Scribus/scribus/canvasmode_magnifier.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.h (original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.h Wed Aug 21 04:24:54 2019
@@ -56,7 +56,7 @@
private:
- double m_Mxp, m_Myp, m_Dxp, m_Dyp;
+ double m_Mxp, m_Myp;
double m_SeRx, m_SeRy;
bool m_lastPosWasOverGuide;
};
More information about the scribus-commit
mailing list