mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Mice are evil
This commit is contained in:
parent
942001c28f
commit
da9c465956
@ -8304,7 +8304,7 @@
|
|||||||
<sleeplib/machine.h>
|
<sleeplib/machine.h>
|
||||||
<list>
|
<list>
|
||||||
|
|
||||||
1307601259 /home/mark/projects/git/sleepyhead/src/version.h
|
1307609269 /home/mark/projects/git/sleepyhead/src/version.h
|
||||||
|
|
||||||
1307418393 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
1307418393 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
||||||
"machine.h"
|
"machine.h"
|
||||||
@ -8341,7 +8341,7 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.h"
|
"sleeplib/machine_loader.h"
|
||||||
|
|
||||||
1307600933 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
1307607607 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
||||||
<wx/settings.h>
|
<wx/settings.h>
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
<wx/log.h>
|
<wx/log.h>
|
||||||
|
@ -328,11 +328,17 @@ void gGraphWindow::ZoomX(double mult,int origin_px)
|
|||||||
}
|
}
|
||||||
SetXBounds(min,max);
|
SetXBounds(min,max);
|
||||||
}
|
}
|
||||||
|
gGraphWindow *LastGraphLDown=NULL;
|
||||||
|
|
||||||
void gGraphWindow::OnMouseMove(wxMouseEvent &event)
|
void gGraphWindow::OnMouseMove(wxMouseEvent &event)
|
||||||
{
|
{
|
||||||
// static bool first=true;
|
// static bool first=true;
|
||||||
static wxRect last;
|
static wxRect last;
|
||||||
|
if (LastGraphLDown && (LastGraphLDown!=this)) {
|
||||||
|
LastGraphLDown->OnMouseMove(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (foobar && m_drag_foobar) {
|
if (foobar && m_drag_foobar) {
|
||||||
int y=event.GetY();
|
int y=event.GetY();
|
||||||
int x=event.GetX();
|
int x=event.GetX();
|
||||||
@ -449,7 +455,6 @@ void gGraphWindow::OnMouseRightRelease(wxMouseEvent &event)
|
|||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
gGraphWindow *LastGraphLDown=NULL;
|
|
||||||
void gGraphWindow::OnMouseLeftDown(wxMouseEvent &event)
|
void gGraphWindow::OnMouseLeftDown(wxMouseEvent &event)
|
||||||
{
|
{
|
||||||
int y=event.GetY();
|
int y=event.GetY();
|
||||||
@ -461,6 +466,9 @@ void gGraphWindow::OnMouseLeftDown(wxMouseEvent &event)
|
|||||||
m_mouseLClick.y = y;
|
m_mouseLClick.y = y;
|
||||||
|
|
||||||
|
|
||||||
|
//if (LastGraphLDown) { // Windows retransmits this crap.
|
||||||
|
//return;
|
||||||
|
//}
|
||||||
if (hot1.Contains(x,y)) {
|
if (hot1.Contains(x,y)) {
|
||||||
m_mouseLDown=true;
|
m_mouseLDown=true;
|
||||||
|
|
||||||
@ -492,7 +500,9 @@ void gGraphWindow::OnMouseLeftDown(wxMouseEvent &event)
|
|||||||
void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
||||||
{
|
{
|
||||||
if (LastGraphLDown && (LastGraphLDown!=this)) { // Same graph that initiated the click??
|
if (LastGraphLDown && (LastGraphLDown!=this)) { // Same graph that initiated the click??
|
||||||
LastGraphLDown->OnMouseLeftDown(event); // Nope.. Give it the event.
|
//m_mouseLDown=false;
|
||||||
|
//m_drag_foobar=false;
|
||||||
|
LastGraphLDown->OnMouseLeftRelease(event); // Nope.. Give it the event.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,7 +515,7 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
bool zoom_in=false;
|
bool zoom_in=false;
|
||||||
bool did_draw=false;
|
bool did_draw=false;
|
||||||
// Finished Dragging the FooBar?
|
// Finished Dragging the FooBar?
|
||||||
if (foobar && m_drag_foobar) {
|
// if (foobar && m_drag_foobar) {
|
||||||
double rx=RealMaxX()-RealMinX();
|
double rx=RealMaxX()-RealMinX();
|
||||||
double qx=double(width)/rx;
|
double qx=double(width)/rx;
|
||||||
double minx=MinX()-RealMinX();
|
double minx=MinX()-RealMinX();
|
||||||
@ -518,7 +528,10 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
x1+=GetLeftMargin();
|
x1+=GetLeftMargin();
|
||||||
x2+=GetLeftMargin();
|
x2+=GetLeftMargin();
|
||||||
if ((x>x1) && (x<x2)) {
|
if ((x>x1) && (x<x2)) {
|
||||||
if (foobar && m_foobar_moved==0) zoom_in=true;
|
if (foobar && m_foobar_moved<2) {
|
||||||
|
zoom_in=true;
|
||||||
|
m_foobar_moved=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// wxLogMessage("Foobar Released");
|
// wxLogMessage("Foobar Released");
|
||||||
@ -530,7 +543,7 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
// did_draw=true;
|
// did_draw=true;
|
||||||
|
|
||||||
// goto end;
|
// goto end;
|
||||||
} else
|
//}
|
||||||
|
|
||||||
if (!zoom_in && m_mouseLDown) { // && !m_drag_foobar) {
|
if (!zoom_in && m_mouseLDown) { // && !m_drag_foobar) {
|
||||||
wxPoint release(event.GetX(), m_scrY-m_marginBottom);
|
wxPoint release(event.GetX(), m_scrY-m_marginBottom);
|
||||||
@ -542,7 +555,7 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
int t1=MIN(x1,x2);
|
int t1=MIN(x1,x2);
|
||||||
int t2=MAX(x1,x2);
|
int t2=MAX(x1,x2);
|
||||||
|
|
||||||
if ((t2-t1)>3) {
|
if ((t2-t1)>4) {
|
||||||
// Range Selected
|
// Range Selected
|
||||||
ZoomXPixels(t1,t2);
|
ZoomXPixels(t1,t2);
|
||||||
did_draw=true;
|
did_draw=true;
|
||||||
@ -550,18 +563,17 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
|
|
||||||
}
|
}
|
||||||
//goto end;
|
//goto end;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!did_draw && (m_mouseLDown && (hot1.Contains(x,y)) || zoom_in)) {
|
if ((!did_draw && hot1.Contains(x,y)) || zoom_in) {
|
||||||
int xp=event.GetX();
|
int xp=x;
|
||||||
if (zoom_in) xp=0;
|
if (zoom_in) xp=0;
|
||||||
double zoom_fact=0.5;
|
double zoom_fact=0.5;
|
||||||
if (event.ControlDown()) zoom_fact=0.25;
|
if (event.ControlDown()) zoom_fact=0.25;
|
||||||
for (list<gGraphWindow *>::iterator g=link_zoom.begin();g!=link_zoom.end();g++) {
|
//for (list<gGraphWindow *>::iterator g=link_zoom.begin();g!=link_zoom.end();g++) {
|
||||||
(*g)->ZoomX(zoom_fact,xp);
|
// (*g)->ZoomX(zoom_fact,xp);
|
||||||
}
|
//}
|
||||||
if (!m_block_zoom) {
|
if (!m_block_zoom) {
|
||||||
ZoomX(zoom_fact,xp); //event.GetX()); // adds origin to zoom in.. Doesn't look that cool.
|
ZoomX(zoom_fact,xp); //event.GetX()); // adds origin to zoom in.. Doesn't look that cool.
|
||||||
}
|
}
|
||||||
@ -570,12 +582,12 @@ void gGraphWindow::OnMouseLeftRelease(wxMouseEvent &event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_mouseRBrect=wxRect(0, 0, 0, 0);
|
m_mouseRBrect=wxRect(0, 0, 0, 0);
|
||||||
if (m_mouseLDown && !did_draw) {
|
m_mouseLDown=false;
|
||||||
|
m_drag_foobar=false;
|
||||||
|
if (!did_draw) {
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
end:
|
LastGraphLDown=NULL;
|
||||||
m_drag_foobar=false;
|
|
||||||
m_mouseLDown=false;
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ namespace AutoVersion{
|
|||||||
//Standard Version Type
|
//Standard Version Type
|
||||||
static const long MAJOR = 0;
|
static const long MAJOR = 0;
|
||||||
static const long MINOR = 7;
|
static const long MINOR = 7;
|
||||||
static const long BUILD = 4036;
|
static const long BUILD = 4058;
|
||||||
static const long REVISION = 5232;
|
static const long REVISION = 5369;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long BUILDS_COUNT = 2284;
|
static const long BUILDS_COUNT = 2363;
|
||||||
#define RC_FILEVERSION 0,7,4036,5232
|
#define RC_FILEVERSION 0,7,4058,5369
|
||||||
#define RC_FILEVERSION_STRING "0, 7, 4036, 5232\0"
|
#define RC_FILEVERSION_STRING "0, 7, 4058, 5369\0"
|
||||||
static const char FULLVERSION_STRING[] = "0.7.4036.5232";
|
static const char FULLVERSION_STRING[] = "0.7.4058.5369";
|
||||||
|
|
||||||
//These values are to keep track of your versioning state, don't modify them.
|
//These values are to keep track of your versioning state, don't modify them.
|
||||||
static const long BUILD_HISTORY = 0;
|
static const long BUILD_HISTORY = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user