Skip to content
Snippets Groups Projects
Commit b3284a1e authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Fixed an issue with animated icons on fancylineedit

Using a static local here is obviously simply wrong.
This should take care of the remaining issues with broken
animation states.

Reviewed-by: danimo
parent f5f17b63
No related branches found
No related tags found
No related merge requests found
...@@ -126,10 +126,9 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) : ...@@ -126,10 +126,9 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) :
void FancyLineEdit::checkButton(const QString &text) void FancyLineEdit::checkButton(const QString &text)
{ {
if (autoHideIcon()) { if (autoHideIcon()) {
static QString oldtext; if (m_oldText.isEmpty() || text.isEmpty())
if (oldtext.isEmpty() || text.isEmpty())
m_d->m_iconbutton->animateShow(!text.isEmpty()); m_d->m_iconbutton->animateShow(!text.isEmpty());
oldtext = text; m_oldText = text;
} }
} }
......
...@@ -114,6 +114,7 @@ private: ...@@ -114,6 +114,7 @@ private:
bool isSideStored() const; bool isSideStored() const;
FancyLineEditPrivate *m_d; FancyLineEditPrivate *m_d;
QString m_oldText;
}; };
} // namespace Utils } // namespace Utils
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment