Skip to content

Commit

Permalink
Remove all calls to repaint() and replace by update()
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKepzie committed Sep 26, 2015
1 parent 72d3e85 commit 8c75622
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions Gui/AnimatedCheckBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,28 @@ void
AnimatedCheckBox::setAnimation(int i)
{
animation = i;
repaint();
update();
}

void
AnimatedCheckBox::setReadOnly(bool readOnly)
{
this->readOnly = readOnly;
repaint();
update();
}

void
AnimatedCheckBox::setDirty(bool b)
{
dirty = b;
repaint();
update();
}

void
AnimatedCheckBox::setChecked(bool c) {
checked = c;
Q_EMIT toggled(checked);
repaint();
update();
}

void
Expand All @@ -82,7 +82,7 @@ AnimatedCheckBox::keyPressEvent(QKeyEvent* e)
checked = !checked;
Q_EMIT toggled(checked);
Q_EMIT clicked(checked);
repaint();
update();
} else {
QFrame::keyPressEvent(e);
}
Expand All @@ -96,7 +96,7 @@ AnimatedCheckBox::mousePressEvent(QMouseEvent* e)
return;
}
checked = !checked;
repaint();
update();
Q_EMIT clicked(checked);
Q_EMIT toggled(checked);

Expand Down
16 changes: 8 additions & 8 deletions Gui/ComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ ComboBox::mousePressEvent(QMouseEvent* e)
if ( buttonDownIsLeft(e) && !_readOnly && _enabled ) {
_clicked = true;
createMenu();
repaint();
update();
QFrame::mousePressEvent(e);
}
}
Expand All @@ -376,7 +376,7 @@ void
ComboBox::mouseReleaseEvent(QMouseEvent* e)
{
_clicked = false;
repaint();
update();
QFrame::mouseReleaseEvent(e);
}

Expand Down Expand Up @@ -451,7 +451,7 @@ ComboBox::createMenu()
}
_clicked = false;
setFocus();
repaint();
update();
}

int
Expand Down Expand Up @@ -988,7 +988,7 @@ void
ComboBox::setReadOnly(bool readOnly)
{
_readOnly = readOnly;
repaint();
update();
}

bool
Expand All @@ -1001,7 +1001,7 @@ void
ComboBox::setEnabled_natron(bool enabled)
{
_enabled = enabled;
repaint();
update();
}

int
Expand All @@ -1014,21 +1014,21 @@ void
ComboBox::setAnimation(int i)
{
_animation = i;
repaint();
update();
}

void
ComboBox::setDirty(bool b)
{
_dirty = b;
repaint();
update();
}

void
ComboBox::setAltered(bool b)
{
_altered = b;
repaint();
update();
}

bool
Expand Down
6 changes: 3 additions & 3 deletions Gui/InfoViewerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ InfoViewerWidget::setColor(float r,
values.prepend("<b> ~ </b>");
}
rgbaValues->setText(values);
rgbaValues->repaint();
rgbaValues->update();
float h,s,v,l;
// Nuke's HSV display is based on sRGB, an L is Rec.709.
// see http://forums.thefoundry.co.uk/phpBB2/viewtopic.php?t=2283
Expand All @@ -327,7 +327,7 @@ InfoViewerWidget::setColor(float r,
QPixmap pix(15,15);
pix.fill(col);
color->setPixmap(pix);
color->repaint();
color->update();

const QFont &hsvFont = hvl_lastOption->font();

Expand All @@ -350,7 +350,7 @@ InfoViewerWidget::setColor(float r,
.arg(hsvFont.pixelSize());

hvl_lastOption->setText(hsvlValues);
hvl_lastOption->repaint();
hvl_lastOption->update();
} // setColor

void
Expand Down
6 changes: 3 additions & 3 deletions Gui/KnobGuiString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ AnimatingTextEdit::setAnimation(int v)
animation = v;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand All @@ -109,7 +109,7 @@ AnimatingTextEdit::setReadOnlyNatron(bool ro)
readOnlyNatron = ro;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand All @@ -118,7 +118,7 @@ AnimatingTextEdit::setDirty(bool b)
dirty = b;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand Down
2 changes: 1 addition & 1 deletion Gui/Label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Label::refreshStyle()
{
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand Down
6 changes: 3 additions & 3 deletions Gui/LineEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ LineEdit::setAnimation(int v)
animation = v;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand All @@ -128,7 +128,7 @@ LineEdit::setDirty(bool b)
dirty = b;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand All @@ -137,7 +137,7 @@ LineEdit::setAltered(bool b)
altered = b;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand Down
4 changes: 2 additions & 2 deletions Gui/ScaleSliderQWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void
ScaleSliderQWidget::setAltered(bool b)
{
_imp->altered = b;
repaint();
update();
}

bool
Expand Down Expand Up @@ -504,6 +504,6 @@ ScaleSliderQWidget::setUseLineColor(bool use, const QColor& color)
{
_imp->useLineColor = use;
_imp->lineColor = color;
repaint();
update();
}

2 changes: 1 addition & 1 deletion Gui/ScriptTextEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ScriptTextEdit::setOutput(bool o)
isOutput = o;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

bool
Expand Down
6 changes: 3 additions & 3 deletions Gui/SpinBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ SpinBox::setAnimation(int i)
animation = i;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

void
Expand All @@ -798,7 +798,7 @@ SpinBox::setDirty(bool d)
dirty = d;
style()->unpolish(this);
style()->polish(this);
repaint();
update();
}

QMenu*
Expand Down Expand Up @@ -827,5 +827,5 @@ SpinBox::setUseLineColor(bool use, const QColor& color)
{
_imp->useLineColor = use;
_imp->lineColor = color;
repaint();
update();
}
4 changes: 2 additions & 2 deletions Gui/SplashScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void
SplashScreen::updateText(const QString & text)
{
_text = text;
repaint();
update();
QCoreApplication::processEvents();
}

Expand Down Expand Up @@ -120,7 +120,7 @@ void
LoadProjectSplashScreen::updateText(const QString & text)
{
_text = text;
repaint();
update();
QCoreApplication::processEvents();
}

Expand Down
4 changes: 2 additions & 2 deletions Gui/TabWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TransparantDropRect: public QWidget
{
_type = type;
if (type != TabWidget::eDropRectNone) {
repaint();
update();
}
}

Expand Down Expand Up @@ -1266,7 +1266,7 @@ TabWidget::dropEvent(QDropEvent* e)
}
_imp->drawDropRect = false;
setFrameShape(QFrame::NoFrame);
repaint();
update();
}

TabBar::TabBar(TabWidget* tabWidget,
Expand Down

0 comments on commit 8c75622

Please sign in to comment.