mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
fixed missing tooltip update for toggle/mode-type buttons
This commit is contained in:
parent
3b347e666b
commit
d37ff8ec63
2 changed files with 14 additions and 0 deletions
|
@ -72,6 +72,11 @@ CSVWidget::PushButton::PushButton (const QIcon& icon, Type type, const QString&
|
|||
QWidget *parent)
|
||||
: QPushButton (icon, "", parent), mKeepOpen (false), mType (type), mToolTip (tooltip)
|
||||
{
|
||||
if (type==Type_Mode || type==Type_Toggle)
|
||||
{
|
||||
setCheckable (true);
|
||||
connect (this, SIGNAL (toggled (bool)), this, SLOT (checkedStateChanged (bool)));
|
||||
}
|
||||
setCheckable (type==Type_Mode || type==Type_Toggle);
|
||||
setExtendedToolTip();
|
||||
}
|
||||
|
@ -97,3 +102,8 @@ CSVWidget::PushButton::Type CSVWidget::PushButton::getType() const
|
|||
{
|
||||
return mType;
|
||||
}
|
||||
|
||||
void CSVWidget::PushButton::checkedStateChanged (bool checked)
|
||||
{
|
||||
setExtendedToolTip();
|
||||
}
|
|
@ -53,6 +53,10 @@ namespace CSVWidget
|
|||
QString getBaseToolTip() const;
|
||||
|
||||
Type getType() const;
|
||||
|
||||
private slots:
|
||||
|
||||
void checkedStateChanged (bool checked);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue