Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 21211 → Rev 21212

/trunk/Scribus/scribus/ui/measurements.cpp
4,8 → 4,12
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
 
#include <cmath>
 
#include "measurements.h"
#include <cmath>
#include "scribusdoc.h"
#include "scribusview.h"
#include "units.h"
 
using namespace std;
37,6 → 41,20
int minHeight = unitSwitch->minimumSizeHint().height();
unitSwitch->setMinimumSize(textWidth, minHeight);
resize(minimumSizeHint());
 
// Try to start with doc unit if possible
ScribusView* view = qobject_cast<ScribusView*>(parent);
if (view)
{
ScribusDoc* doc = view->Doc;
if (doc)
{
int unitIndex = doc->unitIndex();
unitSwitch->setCurrentIndex(unitIndex);
}
}
setValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
connect(unitSwitch, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged()));
}