Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 25048 → Rev 25049

/branches/Version15x/Scribus/scribus/scribusview.cpp
3270,30 → 3270,28
setViewportMargins(newTopLeftMargin, newTopLeftMargin, 0, 0);
}
 
void ScribusView::setScale(const double newScale)
void ScribusView::setScale(double newScale)
{
double Scale=newScale;
double v=m_doc->opToolPrefs().magMin*Prefs->displayPrefs.displayScale/100.0;
if (Scale < v)
Scale=v;
double v2=m_doc->opToolPrefs().magMax*Prefs->displayPrefs.displayScale/100.0;
if (Scale > v2)
Scale=v2;
double v3=320*Prefs->displayPrefs.displayScale;
if (Scale > v3)
Scale=v3;
double canvasScale = newScale;
double v = m_doc->opToolPrefs().magMin * Prefs->displayPrefs.displayScale / 100.0;
if (canvasScale < v)
canvasScale = v;
double v2 = m_doc->opToolPrefs().magMax * Prefs->displayPrefs.displayScale / 100.0;
if (canvasScale > v2)
canvasScale = v2;
double v3 = 320 * Prefs->displayPrefs.displayScale;
if (canvasScale > v3)
canvasScale = v3;
 
m_canvas->setScale(Scale);
m_canvas->setScale(canvasScale);
 
m_ScMW->zoomSpinBox->blockSignals(true);
m_ScMW->zoomSpinBox->setValue(m_canvas->scale()/Prefs->displayPrefs.displayScale*100);
m_ScMW->zoomSpinBox->blockSignals(false);
bool sigBlocked = m_ScMW->zoomSpinBox->blockSignals(true);
m_ScMW->zoomSpinBox->setValue(m_canvas->scale() / Prefs->displayPrefs.displayScale * 100);
m_ScMW->zoomSpinBox->blockSignals(sigBlocked);
 
unitChange();
}
 
 
 
double ScribusView::scale() const
{
return m_canvas->scale();
/branches/Version15x/Scribus/scribus/scribusview.h
198,7 → 198,7
Selection* customSelection = 0);
void endGroupTransaction();
void cancelGroupTransaction();
void setScale(const double newScale);
void setScale(double newScale);
double scale() const;
 
void changed(QRectF re, bool) override;