Skip to content

Commit e0843a8

Browse files
committed
CommitForm: refresh when focus is regained (203)
When the commit form gets focused, the file list will get refreshed . Closes #203
1 parent bf80e96 commit e0843a8

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/plugins/git/CommitForm.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,17 @@ CommitForm::~CommitForm() { delete ui; }
354354

355355
QString CommitForm::mdiClientFileName() { return QString("git:%1").arg(repoRoot); }
356356

357+
bool CommitForm::event(QEvent *e) {
358+
switch (e->type()) {
359+
case QEvent::Show:
360+
updateGitStatus();
361+
break;
362+
default:
363+
break;
364+
}
365+
return QWidget::event(e);
366+
}
367+
357368
void CommitForm::keyPressEvent(QKeyEvent *event) {
358369
#if 0
359370
Commenting this out. I am not giving this up, but I think that for now hiding the bottom

src/plugins/git/CommitForm.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class CommitForm : public QWidget, public qmdiClient {
2222
virtual QString mdiClientFileName() override;
2323

2424
protected:
25+
bool event(QEvent *event) override;
2526
void keyPressEvent(QKeyEvent *event) override;
2627

2728
public slots:

0 commit comments

Comments
 (0)