Commit 522fa138 authored by Denis Khachko's avatar Denis Khachko

Draw fixes

parent ce3da667
...@@ -632,14 +632,12 @@ void DrawView::resizeEvent ( QResizeEvent * event ) ...@@ -632,14 +632,12 @@ void DrawView::resizeEvent ( QResizeEvent * event )
{ {
setViewportUpdateMode (QGraphicsView::SmartViewportUpdate); setViewportUpdateMode (QGraphicsView::SmartViewportUpdate);
QPointF delta=mapToScene(press_pos)-mapToScene(event->pos()); QPointF delta=mapToScene(press_pos)-mapToScene(event->pos());
//if(qAbs(delta.x())>100)press_pos.setX(event->pos().x());
//if(qAbs(delta.y())>100)press_pos.setY(event->pos().y());
QPointF center = mapToScene(viewport()->rect().center()); QPointF center = mapToScene(viewport()->rect().center());
//QPointF center = sceneRect().center(); //QPointF center = sceneRect().center();
qDebug()<<"CenterOn"<<center; qDebug()<<"CenterOn"<<center;
// center.setX(center.x()+(mapToScene(press_pos).x()-mapToScene(event->pos()).x()));
// center.setY(center.y()+(mapToScene(press_pos).y()-mapToScene(event->pos()).y()));
// scrollContentsBy(press_pos.x()-event->pos().x(), 10);
verticalScrollBar()->setValue(verticalScrollBar()->value()+(press_pos.y()-event->pos().y())); verticalScrollBar()->setValue(verticalScrollBar()->value()+(press_pos.y()-event->pos().y()));
horizontalScrollBar()->setValue(horizontalScrollBar()->value() +(press_pos.x()-event->pos().x())); horizontalScrollBar()->setValue(horizontalScrollBar()->value() +(press_pos.x()-event->pos().x()));
// centerOn(center); // centerOn(center);
......
...@@ -70,7 +70,7 @@ DrawNavigator::DrawNavigator( QWidget * parent ){ ...@@ -70,7 +70,7 @@ DrawNavigator::DrawNavigator( QWidget * parent ){
zoomFullDraw->move(zoomUp->pos().x(),zoomDown->pos().y()+zoomDown->height() ); zoomFullDraw->move(zoomUp->pos().x(),zoomDown->pos().y()+zoomDown->height() );
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
if(isAutonet->isChecked())netStepXS->setEnabled(false);
}; };
...@@ -98,6 +98,9 @@ void DrawNavigator::YvalueChange(double value) ...@@ -98,6 +98,9 @@ void DrawNavigator::YvalueChange(double value)
void DrawNavigator::autoNet(int state) void DrawNavigator::autoNet(int state)
{ {
if(isAutonet->isChecked())netStepXS->setEnabled(false);
else netStepXS->setEnabled(true);
emit autoNetChange(isAutonet->isChecked()); emit autoNetChange(isAutonet->isChecked());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment