mirror of
https://github.com/alexkay/spek.git
synced 2025-04-17 00:52:20 +03:00
Force re-paint
This commit is contained in:
parent
38cc7f2343
commit
3805a551fb
@ -25,6 +25,7 @@
|
||||
#include "spek-spectrogram.hh"
|
||||
|
||||
BEGIN_EVENT_TABLE(SpekSpectrogram, wxPanel)
|
||||
EVT_IDLE(SpekSpectrogram::on_idle)
|
||||
EVT_PAINT(SpekSpectrogram::on_paint)
|
||||
EVT_SIZE(SpekSpectrogram::on_size)
|
||||
END_EVENT_TABLE()
|
||||
@ -73,6 +74,11 @@ void SpekSpectrogram::save(const wxString& path)
|
||||
{
|
||||
}
|
||||
|
||||
void SpekSpectrogram::on_idle(wxIdleEvent& evt)
|
||||
{
|
||||
Update();
|
||||
}
|
||||
|
||||
void SpekSpectrogram::on_paint(wxPaintEvent& evt)
|
||||
{
|
||||
wxAutoBufferedPaintDC dc(this);
|
||||
@ -176,6 +182,7 @@ void SpekSpectrogram::pipeline_cb(int sample, float *values, void *cb_data)
|
||||
}
|
||||
|
||||
s->Refresh(); // TODO: refresh only one pixel column
|
||||
wxWakeUpIdle();
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@ public:
|
||||
void save(const wxString& path);
|
||||
|
||||
private:
|
||||
void on_idle(wxIdleEvent& evt);
|
||||
void on_paint(wxPaintEvent& evt);
|
||||
void on_size(wxSizeEvent& evt);
|
||||
void render(wxDC& dc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user