blinker tweaks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1631 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2011-01-21 14:23:36 +00:00
parent 579f180549
commit c3133d761d
3 changed files with 13 additions and 3 deletions
+4 -2
View File
@@ -420,8 +420,10 @@ void ConsolePanel::doPaste() { entry->doPaste(); }
void ConsolePanel::start_blinker() {
if (new_errors_since_last_view) {
blinker_state = 0;
blinker_timer.Start(BLINK_TIME);
update_blinker();
if (blinker_state < MAX_BLINKS) {
blinker_timer.Start(BLINK_TIME);
}
}
}
void ConsolePanel::stop_blinker() {
@@ -432,7 +434,7 @@ void ConsolePanel::stop_blinker() {
}
void ConsolePanel::onTimer(wxTimerEvent&) {
blinker_state++;
if (blinker_state > MAX_BLINKS) {
if (blinker_state >= MAX_BLINKS) {
blinker_timer.Stop();
}
update_blinker();