diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-09-07 13:38:10 -0500 |
|---|---|---|
| committer | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-09-07 13:38:10 -0500 |
| commit | 311e260d658d799899140277d318773ae3a197a2 (patch) | |
| tree | b5f9bcaabd70eca855f265df6b1d9c97d0ea37aa | |
| parent | fe5128280c4e86dbc8e6b7af284bebb9c4f570f0 (diff) | |
Add 600ms rate limit to IC signal
| -rw-r--r-- | include/courtroom.h | 1 | ||||
| -rw-r--r-- | src/courtroom.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/courtroom.h b/include/courtroom.h index 5b5ff6c1..8f5e43ae 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -828,6 +828,7 @@ private slots: void on_casing_clicked(); void ping_server(); + void ratelimit_ic(); }; #endif // COURTROOM_H diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 04c625fe..c1a306ea 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1525,6 +1525,8 @@ void Courtroom::on_chat_return_pressed() if ((anim_state < 3 || text_state < 2) && objection_state == 0) return; + ui_ic_chat_message->blockSignals(true); + QTimer::singleShot(600, this, SLOT(ratelimit_ic())); // MS# // deskmod# // pre-emote# @@ -4709,6 +4711,10 @@ void Courtroom::announce_case(QString title, bool def, bool pro, bool jud, } } +void Courtroom::ratelimit_ic() { + ui_ic_chat_message->blockSignals(false); +} + Courtroom::~Courtroom() { delete music_player; |
