diff --git a/Projects/CodeBlocks/SleepyHead.cbp b/Projects/CodeBlocks/SleepyHead.cbp index 2fc04f84..f1c4cb14 100644 --- a/Projects/CodeBlocks/SleepyHead.cbp +++ b/Projects/CodeBlocks/SleepyHead.cbp @@ -54,6 +54,23 @@ + + diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 2cc7362d..381e317f 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8304,7 +8304,7 @@ -1307543626 /home/mark/projects/git/sleepyhead/src/version.h +1307547046 /home/mark/projects/git/sleepyhead/src/version.h 1307418393 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h "machine.h" @@ -8341,7 +8341,7 @@ "sleeplib/profiles.h" "sleeplib/machine_loader.h" -1307543431 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp +1307545866 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp diff --git a/Projects/CodeBlocks/SleepyHead.layout b/Projects/CodeBlocks/SleepyHead.layout index b41fa996..947c3956 100644 --- a/Projects/CodeBlocks/SleepyHead.layout +++ b/Projects/CodeBlocks/SleepyHead.layout @@ -1,6 +1,6 @@ - + @@ -44,6 +44,6 @@ - + diff --git a/src/graphs/graph.cpp b/src/graphs/graph.cpp index a4478770..86a8db2a 100644 --- a/src/graphs/graph.cpp +++ b/src/graphs/graph.cpp @@ -232,9 +232,9 @@ void gGraphWindow::MoveX(int i) double min,max; MoveX(i,min,max); - for (list::iterator g=link_zoom.begin();g!=link_zoom.end();g++) { +/* for (list::iterator g=link_zoom.begin();g!=link_zoom.end();g++) { (*g)->SetXBounds(min,max); - } + } */ if (!m_block_zoom) SetXBounds(min,max); } void gGraphWindow::ZoomX(double mult,int origin_px) @@ -374,6 +374,12 @@ void gGraphWindow::OnMouseRightRelease(wxMouseEvent &event) if (!m_block_zoom) { ZoomX(zoom_fact,0); //event.GetX()); // adds origin to zoom out.. Doesn't look that cool. } + } else { + double min=MinX(); + double max=MaxX(); + for (list::iterator g=link_zoom.begin();g!=link_zoom.end();g++) { + (*g)->SetXBounds(min,max); + } } m_mouseRDown=false; @@ -417,11 +423,11 @@ void gGraphWindow::OnMouseLeftDown(wxMouseEvent &event) } void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event) { -/* int y=event.GetY(); + int y=event.GetY(); int x=event.GetX(); int width=m_scrX-GetRightMargin()-GetLeftMargin(); int height=m_scrY-GetBottomMargin()-GetTopMargin(); - wxRect hot1(GetLeftMargin(),GetTopMargin(),width,height); // Graph data area. */ + wxRect hot1(GetLeftMargin(),GetTopMargin(),width,height); // Graph data area. if (m_drag_foobar) { // wxLogMessage("Foobar Released"); @@ -443,17 +449,23 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event) m_mouseLDown=false; m_mouseRBrect=wxRect(0, 0, 0, 0); + if ((t2-t1)>3) { - ZoomXPixels(t1,t2); + //if (hot1.Contains(x,y)) { + ZoomXPixels(t1,t2); + //} else { + //Refresh(); + //} } else { - double zoom_fact=0.5; - if (event.ControlDown()) zoom_fact=0.25; - for (list::iterator g=link_zoom.begin();g!=link_zoom.end();g++) { - (*g)->ZoomX(zoom_fact,event.GetX()); - } - if (!m_block_zoom) { - ZoomX(zoom_fact,event.GetX()); //event.GetX()); // adds origin to zoom out.. Doesn't look that cool. - } + double zoom_fact=0.5; + if (event.ControlDown()) zoom_fact=0.25; + for (list::iterator g=link_zoom.begin();g!=link_zoom.end();g++) { + (*g)->ZoomX(zoom_fact,event.GetX()); + } + if (!m_block_zoom) { + ZoomX(zoom_fact,event.GetX()); //event.GetX()); // adds origin to zoom out.. Doesn't look that cool. + } + } } diff --git a/src/version.h b/src/version.h index f21a6003..19c4a5e6 100644 --- a/src/version.h +++ b/src/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 = 3815; - static const long REVISION = 4044; + static const long BUILD = 3821; + static const long REVISION = 4068; //Miscellaneous Version Types - static const long BUILDS_COUNT = 1780; - #define RC_FILEVERSION 0,7,3815,4044 - #define RC_FILEVERSION_STRING "0, 7, 3815, 4044\0" - static const char FULLVERSION_STRING[] = "0.7.3815.4044"; + static const long BUILDS_COUNT = 1796; + #define RC_FILEVERSION 0,7,3821,4068 + #define RC_FILEVERSION_STRING "0, 7, 3821, 4068\0" + static const char FULLVERSION_STRING[] = "0.7.3821.4068"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 0;