Skip to content

Commit

Permalink
Also affect antialias of edges with antialias setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKepzie committed Nov 25, 2015
1 parent 2dd1878 commit bc2de0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Engine/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ Settings::initializeKnobsNodeGraph()
_nodegraphTab->addKnob(_usePluginIconsInNodeGraph);

_useAntiAliasing = Natron::createKnob<KnobBool>(this, "Anti-Aliasing");
_useAntiAliasing->setHintToolTip("When checked, the node graph will be painted using anti-aliasing. Unchecking it may increase performances.");
_useAntiAliasing->setHintToolTip("When checked, the node graph will be painted using anti-aliasing. Unchecking it may increase performances."
" Changing this requires a restart of Natron");
_useAntiAliasing->setAnimationEnabled(false);
_nodegraphTab->addKnob(_useAntiAliasing);

Expand Down
11 changes: 9 additions & 2 deletions Gui/Edge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,11 @@ Edge::paint(QPainter *painter,
const QStyleOptionGraphicsItem * /*options*/,
QWidget * /*parent*/)
{
painter->setRenderHint(QPainter::Antialiasing, false);
bool antialias = appPTR->getCurrentSettings()->isNodeGraphAntiAliasingEnabled();
if (!antialias) {
painter->setRenderHint(QPainter::Antialiasing, false);
}

QPen myPen = pen();

boost::shared_ptr<NodeGui> dst = _imp->dest.lock();
Expand Down Expand Up @@ -879,7 +883,10 @@ LinkArrow::paint(QPainter *painter,
const QStyleOptionGraphicsItem* /*options*/,
QWidget* /*parent*/)
{
painter->setRenderHint(QPainter::Antialiasing, false);
bool antialias = appPTR->getCurrentSettings()->isNodeGraphAntiAliasingEnabled();
if (!antialias) {
painter->setRenderHint(QPainter::Antialiasing, false);
}
QPen myPen = pen();

myPen.setColor(_renderColor);
Expand Down

0 comments on commit bc2de0a

Please sign in to comment.