Commit 90d6a1ae authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix update icon

parent 0cf461f8
Pipeline #49297 failed with stage
in 20 minutes and 54 seconds
......@@ -131,6 +131,7 @@ Widget::Widget(QWidget *pParent)
g->addWidget(d->tabLockedWarning, 0);
connect(d->tabLockedWarning, &TabLockedWarning::unlockTabRequested, this, [this]() {
setLockTab(false);
Q_EMIT unlockTabRequested();
// Fix icon!
});
......
......@@ -217,6 +217,7 @@ Q_SIGNALS:
*/
void statusMessage(const QString &message);
void forceLostFocus();
void unlockTabRequested();
protected Q_SLOTS:
/**
......
......@@ -814,6 +814,13 @@ QItemSelectionModel *Pane::createNewTab()
connect(w, &Core::Widget::statusMessage, this, &Pane::statusMessage);
connect(w, &Core::Widget::forceLostFocus, this, &Pane::forceLostFocus);
connect(w, &Core::Widget::unlockTabRequested, this, [this, w]() {
for (int i = 0; i < count(); ++i) {
if (w == qobject_cast<Widget *>(widget(i))) {
setTabIcon(i, QIcon::fromTheme(QStringLiteral("unlock")));
}
}
});
d->updateTabControls();
setCurrentWidget(w);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment