RefreshData -> DoRefreshData event fix

This commit is contained in:
Mark Watkins 2011-06-17 10:28:46 +10:00
parent da1a6eaa72
commit fe380306fd
4 changed files with 34 additions and 17 deletions

View File

@ -8309,7 +8309,7 @@
1308026543 D
1308260097 /home/mark/projects/git/sleepyhead/src/version.h
1308265378 /home/mark/projects/git/sleepyhead/src/version.h
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
<wx/dcbuffer.h>
@ -8341,7 +8341,7 @@
"preferences.h"
"tinyxml/tinyxml.h"
1308259685 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
1308264665 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
"wx_pch.h"
"version.h"
<wx/app.h>
@ -8362,7 +8362,7 @@
"sleeplib/profiles.h"
"sleeplib/machine_loader.h"
1308259082 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
1308265075 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
"freetype-gl/font-manager.h"
"freetype-gl/texture-font.h"
"graph.h"

View File

@ -353,7 +353,7 @@ void SleepyHeadFrame::OnViewMenuDaily( wxCommandEvent& event )
} else {
main_auinotebook->SetSelection(idx);
daily->Refresh(true);
daily->Refresh();
}
@ -711,7 +711,7 @@ Daily::Daily(wxWindow *win,Profile *p)
SF->AddLayer(new gFlagsLine(flags[3],wxBLUE,wxT("H"),3,sfc));
SF->AddLayer(new gFlagsLine(flags[2],wxAQUA,wxT("OA"),2,sfc));
SF->AddLayer(new gFlagsLine(flags[1],wxPURPLE,wxT("CA"),1,sfc));
SF->AddLayer(new gFlagsLine(flags[0],wxGREEN2,wxT("CSR"),0,sfc));
SF->AddLayer(new gFlagsLine(flags[0],wxGREEN,wxT("CSR"),0,sfc));
SF->AddLayer(new gFooBar(wxGREEN,wxDARK_GREY,true));
@ -832,7 +832,7 @@ Daily::Daily(wxWindow *win,Profile *p)
//fgSizer->Add(TAP_EAP,1,wxEXPAND);
this->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler(Daily::OnEventTreeSelection), NULL, this);
this->Connect(wxID_ANY, wxEVT_REFRESH_DAILY, wxCommandEventHandler(Daily::RefreshData));
this->Connect(wxID_ANY, wxEVT_REFRESH_DAILY, wxCommandEventHandler(Daily::DoRefreshData));
//this->Connect(wxEVT_SCROLLWIN_THUMBTRACK
@ -919,7 +919,7 @@ void Daily::RefreshData()
wxCommandEvent MyEvent( wxEVT_REFRESH_DAILY);
wxPostEvent(this, MyEvent);
}
void Daily::RefreshData(wxCommandEvent& event)
void Daily::DoRefreshData(wxCommandEvent& event)
{
wxDateTime date=Calendar->GetDate();
date.ResetTime();

View File

@ -56,13 +56,14 @@ wxColor *wxDARK_GREEN=&zwxDARK_GREEN;
wxColor zwxDARK_GREY(0xA0,0xA0,0xA0,0xA0);
wxColor *wxDARK_GREY=&zwxDARK_GREY;
bool gfont_init=false;
FontManager *font_manager;
TextureFont *bigfont=NULL,*zfont=NULL;
VertexBuffer *vbuffer=NULL;
TextMarkup *markup=NULL;
static bool gfont_init=false;
// Must be called from a thread inside the application.
void GraphInit()
{
@ -373,7 +374,7 @@ gGraphWindow::gGraphWindow(wxWindow *parent, wxWindowID id,const wxString & titl
m_scrX = m_scrY = 64;
m_title=title;
m_mouseRDown=m_mouseLDown=false;
SetBackgroundColour( *wxWHITE );
//SetBackgroundColour( *wxWHITE );
m_bgColour = *wxWHITE;
m_fgColour = *wxBLACK;
SetMargins(5, 15, 0, 0);
@ -415,7 +416,7 @@ gGraphWindow::gGraphWindow(wxWindow *parent, wxWindowID id,const wxString & titl
if (!title.IsEmpty()) {
AddLayer(new gGraphTitle(title,wxVERTICAL));
}
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
//SetBackgroundStyle(wxBG_STYLE_CUSTOM);
}
gGraphWindow::~gGraphWindow()
@ -1114,7 +1115,7 @@ void gGraphWindow::OnPaint(wxPaintEvent& event)
GetClientSize(&m_scrX, &m_scrY);
Render(m_scrX,m_scrY);
// Render(m_scrX,m_scrY);
if (m_mouseLDown) {
if (m_mouseRBrect.width>0)
@ -2542,6 +2543,17 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
glColor4ub(col.Red(),col.Green(),col.Blue(),col.Alpha());
glScissor(w.GetLeftMargin(),w.GetBottomMargin(),width,height);
glEnable(GL_SCISSOR_TEST);
glLineWidth (1);
bool antialias=pref["UseAntiAliasing"];
if (antialias) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //_MINUS_SRC_ALPHA);
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
}
if (quadcnt>0) {
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_SHORT, 0, quadarray);
@ -2554,6 +2566,11 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
glDrawArrays(GL_LINES, 0, vertcnt>>1);
glDisableClientState(GL_VERTEX_ARRAY);
}
if (antialias) {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
glDisable(GL_SCISSOR_TEST);
}

View File

@ -16,14 +16,14 @@ namespace AutoVersion{
//Standard Version Type
static const long _MAJOR = 0;
static const long _MINOR = 7;
static const long _BUILD = 6458;
static const long _REVISION = 18537;
static const long _BUILD = 6464;
static const long _REVISION = 18572;
//Miscellaneous Version Types
static const long _BUILDS_COUNT = 7602;
#define _RC_FILEVERSION 0,7,6458,18537
#define _RC_FILEVERSION_STRING "0, 7, 6458, 18537\0"
static const char _FULLVERSION_STRING[] = "0.7.6458.18537";
static const long _BUILDS_COUNT = 7622;
#define _RC_FILEVERSION 0,7,6464,18572
#define _RC_FILEVERSION_STRING "0, 7, 6464, 18572\0"
static const char _FULLVERSION_STRING[] = "0.7.6464.18572";
//These values are to keep track of your versioning state, don't modify them.
static const long _BUILD_HISTORY = 0;