forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -126,10 +126,9 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) :
|
||||
void FancyLineEdit::checkButton(const QString &text)
|
||||
{
|
||||
if (autoHideIcon()) {
|
||||
static QString oldtext;
|
||||
if (oldtext.isEmpty() || text.isEmpty())
|
||||
if (m_oldText.isEmpty() || text.isEmpty())
|
||||
m_d->m_iconbutton->animateShow(!text.isEmpty());
|
||||
oldtext = text;
|
||||
m_oldText = text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ private:
|
||||
bool isSideStored() const;
|
||||
|
||||
FancyLineEditPrivate *m_d;
|
||||
QString m_oldText;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user