Commit 1af69626 authored by Matthias Möller's avatar Matthias Möller

changed rulersize to pixelunits

default is 16
refs #1626

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16963 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d1f41660
......@@ -85,7 +85,7 @@ void Ruler::updateNodes()
//set params for the text
ACG::Vec3d distVec = Point1 - Point2;
QString distanceStr = QString().number((distVec).length());
QString distanceStr = QString().number(distVec.length());
textNode_->setText(distanceStr.toStdString());
textNode_->multipassNodeSetActive(8, true);
......@@ -94,7 +94,6 @@ void Ruler::updateNodes()
textTransformNode_->translate(Point1);
ACG::Vec3d halfDist = distVec/2.f;
textTransformNode_->translate(-halfDist);
textTransformNode_->scale(0.025);
emit updateView();
}
......@@ -72,7 +72,7 @@ public:
public slots:
void setTextSize(const unsigned _size){textNode_->setSize(_size*0.1); emit updateView();}
void setTextSize(const unsigned _size){textNode_->setPixelSize(_size); emit updateView();}
private:
......
......@@ -46,4 +46,5 @@ RulerOptions::RulerOptions(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
textSizeSpinBox->setSuffix(" px");
}
......@@ -113,7 +113,7 @@ void RulerPlugin::slotMouseEvent(QMouseEvent* _event)
{
currentRuler_.reset(new Ruler(object,name(),0));
connect(currentRuler_.get(),SIGNAL(updateView()),this,SIGNAL(updateView()));
unsigned textSize = OpenFlipperSettings().value(textSizeSettingName_,10).toUInt();
unsigned textSize = OpenFlipperSettings().value(textSizeSettingName_,16).toUInt();
currentRuler_->setTextSize(textSize);
currentRuler_->setPoints(hitPoint,hitPoint);
enableDragMode(1);
......@@ -263,7 +263,7 @@ bool RulerPlugin::initializeOptionsWidget(QWidget*& _widget)
optionsWidget_ = new RulerOptions();
}
unsigned textSize = OpenFlipperSettings().value(textSizeSettingName_,10).toUInt();
unsigned textSize = OpenFlipperSettings().value(textSizeSettingName_,16).toUInt();
optionsWidget_->textSizeSpinBox->setValue(textSize);
_widget = optionsWidget_;
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment