mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Refrefresh diagramview
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3289 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -352,6 +352,9 @@ void DiagramView::zoomIn() {
|
|||||||
*/
|
*/
|
||||||
void DiagramView::zoomOut() {
|
void DiagramView::zoomOut() {
|
||||||
scale(0.75, 0.75);
|
scale(0.75, 0.75);
|
||||||
|
if ((mapFromScene(0,0).rx() == 0) && (mapFromScene(0,0).ry() == 0)){
|
||||||
|
fitInView(sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
}
|
||||||
adjustGridToZoom();
|
adjustGridToZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,10 +593,10 @@ void DiagramView::wheelEvent(QWheelEvent *e) {
|
|||||||
#else
|
#else
|
||||||
if (!(e -> modifiers() & Qt::ControlModifier)) {
|
if (!(e -> modifiers() & Qt::ControlModifier)) {
|
||||||
if (e -> delta() > 0){
|
if (e -> delta() > 0){
|
||||||
zoomInSlowly();
|
zoomIn();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
zoomOutSlowly();
|
zoomOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user