Commit 9640713917e9c041e75f931f7e5876aefd8c065b
1 parent
99bdfc5567
Exists in
master
and in
2 other branches
길게 눌러 팝업이 뜬 상태로 다시 이벤트가 발생하는 문제 회피
Showing
3 changed files
with
13 additions
and
0 deletions
Show diff stats
app/gui/oven_control/cookpanelbutton.cpp
| ... | ... | @@ -74,6 +74,13 @@ void CookPanelButton::setLongPressEnabled(bool enabled) |
| 74 | 74 | longPressEnabled = enabled; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | +void CookPanelButton::setEnabled(bool enabled) | |
| 78 | +{ | |
| 79 | + ui->pushButton->setEnabled(enabled); | |
| 80 | + ui->showInfoButton->setEnabled(enabled); | |
| 81 | + ui->deleteButton->setEnabled(enabled); | |
| 82 | +} | |
| 83 | + | |
| 77 | 84 | void CookPanelButton::emitLongPressed() |
| 78 | 85 | { |
| 79 | 86 | emitted = true; | ... | ... |
app/gui/oven_control/cookpanelbutton.h
app/gui/oven_control/programmingwindow.cpp
| ... | ... | @@ -180,8 +180,11 @@ void ProgrammingWindow::onDeleteButtonClicked(CookPanelButton *panelButton) |
| 180 | 180 | |
| 181 | 181 | void ProgrammingWindow::onLongPressed(CookPanelButton *panelButton) |
| 182 | 182 | { |
| 183 | + panelButton->setEnabled(false); | |
| 184 | + | |
| 183 | 185 | ProgrammingNamePopup *p = new ProgrammingNamePopup(this, panelButton->record); |
| 184 | 186 | connect(p, SIGNAL(changed()), SLOT(updateView())); |
| 187 | + connect(p, SIGNAL(destroyed(QObject*)), panelButton, SLOT(setEnabled())); | |
| 185 | 188 | p->showFullScreen(); |
| 186 | 189 | } |
| 187 | 190 | ... | ... |