mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Mouse control problem
This commit is contained in:
parent
4000d73edc
commit
263b38749e
@ -47,25 +47,6 @@ gGraphWindow::gGraphWindow(QWidget *parent, const QString & title, QGLContext *
|
|||||||
ti=QDateTime::currentDateTime();
|
ti=QDateTime::currentDateTime();
|
||||||
gtitle=foobar=xaxis=yaxis=NULL;
|
gtitle=foobar=xaxis=yaxis=NULL;
|
||||||
|
|
||||||
|
|
||||||
/* if (!shared_context) {
|
|
||||||
|
|
||||||
int q=0;
|
|
||||||
#if defined(__DARWIN__) && !wxCHECK_VERSION(2,9,0)
|
|
||||||
// Screw you apple..
|
|
||||||
int *attribList = (int*) NULL;
|
|
||||||
AGLPixelFormat aglpf=aglChoosePixelFormat(NULL,0,attribList);
|
|
||||||
shared_context=new wxGLContext(aglpf,this,wxNullPalette,NULL);
|
|
||||||
|
|
||||||
// Mmmmm.. Platform incosistency with wx..
|
|
||||||
|
|
||||||
#else // (Darwin joins the rest of the platforms as of wx2.9)
|
|
||||||
shared_context=new wxGLContext(this,NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//texfont=::texfont;
|
|
||||||
if (!title.isEmpty()) {
|
if (!title.isEmpty()) {
|
||||||
AddLayer(new gTitle(title));
|
AddLayer(new gTitle(title));
|
||||||
}
|
}
|
||||||
@ -335,10 +316,11 @@ void gGraphWindow::mouseMoveEvent(QMouseEvent * event)
|
|||||||
int x2=x;
|
int x2=x;
|
||||||
int t1=MIN(x1,x2);
|
int t1=MIN(x1,x2);
|
||||||
int t2=MAX(x1,x2);
|
int t2=MAX(x1,x2);
|
||||||
if (t1<=m_marginLeft) t1=m_marginLeft+1;
|
if (t1<m_marginLeft) t1=m_marginLeft;
|
||||||
|
if (t2<m_marginLeft) t2=m_marginLeft;
|
||||||
if (t2>(m_scrX-m_marginRight)) t2=m_scrX-m_marginRight;
|
if (t2>(m_scrX-m_marginRight)) t2=m_scrX-m_marginRight;
|
||||||
|
|
||||||
QRect r(t1, m_marginBottom, t2-t1, m_scrY-m_marginBottom-m_marginTop);
|
QRect r(t1-1, m_marginBottom, t2-t1, m_scrY-m_marginBottom-m_marginTop);
|
||||||
|
|
||||||
m_mouseRBlast=m_mouseRBrect;
|
m_mouseRBlast=m_mouseRBrect;
|
||||||
m_mouseRBrect=r;
|
m_mouseRBrect=r;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QResource>
|
#include <QResource>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
|
#include <QWebHistory>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
@ -198,6 +199,8 @@ void MainWindow::on_webView_loadFinished(bool arg1)
|
|||||||
} else {
|
} else {
|
||||||
qstatus->setText("Ready");
|
qstatus->setText("Ready");
|
||||||
}
|
}
|
||||||
|
ui->backButton->setEnabled(ui->webView->history()->canGoBack());
|
||||||
|
ui->forwardButton->setEnabled(ui->webView->history()->canGoForward());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user