diff --git a/SleepyHead.depend b/SleepyHead.depend index 67cc856c..b979d9f3 100644 --- a/SleepyHead.depend +++ b/SleepyHead.depend @@ -7873,7 +7873,7 @@ -1306648365 /home/mark/projects/git/sleepyhead/version.h +1306649352 /home/mark/projects/git/sleepyhead/version.h 1306549105 /home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.h "machine.h" @@ -7890,7 +7890,7 @@ "preferences.h" "tinyxml/tinyxml.h" -1306647571 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp +1306649351 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp "wx_pch.h" "version.h" @@ -7905,7 +7905,7 @@ "SleepyHeadMain.h" "sleeplib/profiles.h" -1306647888 source:/home/mark/projects/git/sleepyhead/graphs/graph.cpp +1306648364 source:/home/mark/projects/git/sleepyhead/graphs/graph.cpp diff --git a/SleepyHeadMain.cpp b/SleepyHeadMain.cpp index 92f9c40c..eb5547ad 100644 --- a/SleepyHeadMain.cpp +++ b/SleepyHeadMain.cpp @@ -91,23 +91,6 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame) id=pref[wxT("DefaultMachine")].GetInteger(); } - if (idGetPageIndex(daily); - if (idx!=wxNOT_FOUND) { - daily->RefreshData(m); - } - idx=main_auinotebook->GetPageIndex(summary); - if (idx!=wxNOT_FOUND) { - summary->RefreshData(m); - } - summary->Refresh(); - daily->Refresh(); - Refresh(); - } - - this->Connect(wxID_ANY, wxEVT_DO_SCREENSHOT, wxCommandEventHandler(SleepyHeadFrame::DoScreenshot)); //this->Connect(wxID_ANY, wxEVT_MACHINE_SELECTED, wxCommandEventHandler(SleepyHeadFrame::OnMachineSelected)); //this->Connect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SleepyHeadFrame::DoScreenshot)); @@ -186,14 +169,14 @@ void SleepyHeadFrame::OnMachineSelected(wxCommandEvent& event) int idx=main_auinotebook->GetPageIndex(daily); if (idx!=wxNOT_FOUND) { daily->RefreshData(m); + daily->Refresh(); } idx=main_auinotebook->GetPageIndex(summary); if (idx!=wxNOT_FOUND) { summary->RefreshData(m); + summary->Refresh(); } - summary->Refresh(); - daily->Refresh(); - Refresh(); + //Refresh(); } void SleepyHeadFrame::OnScreenshot(wxCommandEvent& event) { @@ -293,19 +276,33 @@ void SleepyHeadFrame::OnImportSD(wxCommandEvent &event) void SleepyHeadFrame::OnViewMenuDaily( wxCommandEvent& event ) { int idx=main_auinotebook->GetPageIndex(daily); + int id; if (idx==wxNOT_FOUND) { daily=new Daily(this); main_auinotebook->AddPage(daily,_("Daily"),true); + id=pref["DefaultMachine"].GetInteger(); + Machine *m=cpap_machines[id]; + if (m) daily->RefreshData(m); + daily->Refresh(); + } else { main_auinotebook->SetSelection(idx); } + + } void SleepyHeadFrame::OnViewMenuSummary( wxCommandEvent& event ) { - int idx=main_auinotebook->GetPageIndex(summary); + + int id,idx=main_auinotebook->GetPageIndex(summary); if (idx==wxNOT_FOUND) { summary=new Summary(this); main_auinotebook->AddPage(summary,_("Summary"),true); + id=pref["DefaultMachine"].GetInteger(); + Machine *m=cpap_machines[id]; + if (m) summary->RefreshData(m); + summary->Refresh(); + } else { main_auinotebook->SetSelection(idx); } diff --git a/version.h b/version.h index 5a6ad72f..2ac707fe 100644 --- a/version.h +++ b/version.h @@ -16,14 +16,14 @@ namespace AutoVersion{ //Standard Version Type static const long MAJOR = 0; static const long MINOR = 7; - static const long BUILD = 1771; - static const long REVISION = 4228; + static const long BUILD = 1775; + static const long REVISION = 4252; //Miscellaneous Version Types - static const long BUILDS_COUNT = 6012; - #define RC_FILEVERSION 0,7,1771,4228 - #define RC_FILEVERSION_STRING "0, 7, 1771, 4228\0" - static const char FULLVERSION_STRING[] = "0.7.1771.4228"; + static const long BUILDS_COUNT = 6021; + #define RC_FILEVERSION 0,7,1775,4252 + #define RC_FILEVERSION_STRING "0, 7, 1775, 4252\0" + static const char FULLVERSION_STRING[] = "0.7.1775.4252"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 62;