Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 12586 → Rev 12587

/trunk/Scribus/scribus/canvasmode_legacy.cpp
4767,7 → 4767,7
}
}
*/
if ((m_doc->guidesSettings.guidesShown) && (m_doc->appMode == modeNormal) && (!m_doc->GuideLock) && (m_doc->OnPage(MxpS, MypS) != -1))
if ((m_doc->guidesSettings.guidesShown) && (m_doc->appMode == modeNormal) /*&& (!m_doc->GuideLock)*/ && (m_doc->OnPage(MxpS, MypS) != -1))
{
if (!guideMoveGesture)
{
4775,7 → 4775,7
connect(guideMoveGesture,SIGNAL(guideInfo(int, double)),
m_ScMW->alignDistributePalette,SLOT(setGuide(int, double)));
}
if (guideMoveGesture->mouseHitsGuide(mousePointDoc))
if ( (!m_doc->GuideLock) && (guideMoveGesture->mouseHitsGuide(mousePointDoc)) )
{
m_view->startGesture(guideMoveGesture);
guideMoveGesture->mouseMoveEvent(m);
4783,6 → 4783,13
m_doc->m_Selection->connectItemToGUI();
return true;
}
else
{
// If we call startGesture now, a new guide is created each time.
// ### could be a weakness to avoid calling it tho.
// m_view->startGesture(guideMoveGesture);
guideMoveGesture->mouseSelectGuide(m);
}
/* GxM = -1;
GyM = -1;
QMap<double, uint> tmpGuidesSel;
/trunk/Scribus/scribus/canvasgesture_rulermove.cpp
131,6 → 131,27
return false;
}
 
void RulerGesture::mouseSelectGuide(QMouseEvent *m)
{
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
const int page = m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y());
if ((m_doc->guidesSettings.guidesShown) && page >= 0)
{
double grabRadScale = m_doc->guidesSettings.grabRad / m_canvas->scale();
int index = m_doc->Pages->at(page)->guides.isMouseOnVertical(mousePointDoc.x() + grabRadScale, mousePointDoc.x() - grabRadScale, GuideManagerCore::Standard);
if (index >= 0)
{
emit guideInfo(VERTICAL, m_doc->Pages->at(page)->guides.vertical(index, GuideManagerCore::Standard));
return;
}
index = m_doc->Pages->at(page)->guides.isMouseOnHorizontal(mousePointDoc.y() + grabRadScale, mousePointDoc.y() - grabRadScale, GuideManagerCore::Standard);
if (index >= 0)
{
emit guideInfo(HORIZONTAL, m_doc->Pages->at(page)->guides.horizontal(index, GuideManagerCore::Standard));
return;
}
}
}
 
void RulerGesture::movePoint(QMouseEvent* m)
{
251,3 → 272,4
}
emit guideInfo(m_mode, m_guide);
}
 
/trunk/Scribus/scribus/canvasgesture_rulermove.h
73,6 → 73,11
It prepares the gesture for moving this guide.
*/
bool mouseHitsGuide(FPoint mousePointDoc);
/**
It tests for a guide near position, that guide being moveable or not.
If the test results in success, emits guideInfo;
*/
void mouseSelectGuide(QMouseEvent *m);
private:
ScribusMainWindow* m_ScMW;
Mode m_mode;