Mercurial > hg > svgui
comparison view/Pane.cpp @ 1266:a34a2a25907c
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | a496986aa61b |
children | f2894944c6b8 |
comparison
equal
deleted
inserted
replaced
1265:6e724c81f18f | 1266:a34a2a25907c |
---|---|
1890 if (newStartFrame >= getModelsEndFrame()) { | 1890 if (newStartFrame >= getModelsEndFrame()) { |
1891 newStartFrame = getModelsEndFrame() - 1; | 1891 newStartFrame = getModelsEndFrame() - 1; |
1892 } | 1892 } |
1893 | 1893 |
1894 double ratio = double(w) / double(width()); | 1894 double ratio = double(w) / double(width()); |
1895 // cerr << "ratio: " << ratio << endl; | 1895 // cerr << "ratio: " << ratio << endl; |
1896 int newZoomLevel = (int)nearbyint(m_zoomLevel * ratio); | 1896 int newZoomLevel = (int)nearbyint(m_zoomLevel * ratio); |
1897 if (newZoomLevel < 1) newZoomLevel = 1; | 1897 if (newZoomLevel < 1) newZoomLevel = 1; |
1898 | 1898 |
1899 // cerr << "start: " << m_startFrame << ", level " << m_zoomLevel << endl; | 1899 // cerr << "start: " << m_startFrame << ", level " << m_zoomLevel << endl; |
1900 setZoomLevel(getZoomConstraintBlockSize(newZoomLevel)); | 1900 setZoomLevel(getZoomConstraintBlockSize(newZoomLevel)); |
1901 setStartFrame(newStartFrame); | 1901 setStartFrame(newStartFrame); |
1902 | 1902 |
1903 QString unit; | 1903 QString unit; |
1904 double min, max; | 1904 double min, max; |
2114 layer->snapToFeatureFrame(this, snapFrameLeft, | 2114 layer->snapToFeatureFrame(this, snapFrameLeft, |
2115 resolution, Layer::SnapLeft); | 2115 resolution, Layer::SnapLeft); |
2116 layer->snapToFeatureFrame(this, snapFrameRight, | 2116 layer->snapToFeatureFrame(this, snapFrameRight, |
2117 resolution, Layer::SnapRight); | 2117 resolution, Layer::SnapRight); |
2118 } | 2118 } |
2119 | 2119 |
2120 // cerr << "snap: frame = " << mouseFrame << ", start frame = " << m_selectionStartFrame << ", left = " << snapFrameLeft << ", right = " << snapFrameRight << endl; | 2120 // cerr << "snap: frame = " << mouseFrame << ", start frame = " << m_selectionStartFrame << ", left = " << snapFrameLeft << ", right = " << snapFrameRight << endl; |
2121 | 2121 |
2122 if (snapFrameLeft < 0) snapFrameLeft = 0; | 2122 if (snapFrameLeft < 0) snapFrameLeft = 0; |
2123 if (snapFrameRight < 0) snapFrameRight = 0; | 2123 if (snapFrameRight < 0) snapFrameRight = 0; |
2124 | 2124 |
2125 sv_frame_t min, max; | 2125 sv_frame_t min, max; |