| 349 | } |
| 350 | |
| 351 | bool PaletteEntryEditor::onProcessMessage(Message* msg) |
| 352 | { |
| 353 | if (msg->type() == kTimerMessage && |
| 354 | static_cast<TimerMessage*>(msg)->timer() == &m_redrawTimer) { |
| 355 | // Redraw all editors |
| 356 | if (m_redrawAll) { |
| 357 | m_redrawAll = false; |
| 358 | m_implantChange = false; |
| 359 | m_redrawTimer.stop(); |
| 360 | |
| 361 | // Call all observers of PaletteChange event. |
| 362 | m_selfPalChange = true; |
| 363 | App::instance()->PaletteChange(); |
| 364 | m_selfPalChange = false; |
| 365 | |
| 366 | // Redraw all editors |
| 367 | try { |
| 368 | ContextWriter writer(UIContext::instance()); |
| 369 | Document* document(writer.document()); |
| 370 | if (document != NULL) |
| 371 | document->notifyGeneralUpdate(); |
| 372 | } |
| 373 | catch (...) { |
| 374 | // Do nothing |
| 375 | } |
| 376 | } |
| 377 | // Redraw just the current editor |
| 378 | else { |
| 379 | m_redrawAll = true; |
| 380 | if (current_editor != NULL) |
| 381 | current_editor->updateEditor(); |
| 382 | } |
| 383 | } |
| 384 | return Window::onProcessMessage(msg); |
| 385 | } |
| 386 | |
| 387 | void PaletteEntryEditor::onExit() |
| 388 | { |
nothing calls this directly
no test coverage detected