Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

fix preview range not to be nagative

shun-iwasawaae5a81667ae5
diff --git a/toonz/sources/toonz/xshrowviewer.cpp b/toonz/sources/toonz/xshrowviewer.cpp
index 4af1bd8c8..493595d14 100644
--- a/toonz/sources/toonz/xshrowviewer.cpp
+++ b/toonz/sources/toonz/xshrowviewer.cpp
@@ -680,8 +680,8 @@ void RowArea::drawShiftTraceMarker(QPainter &p) {
QPoint frameAdj = m_viewer->getFrameZoomAdjustment();
int frameAdj_i = (m_viewer->orientation()->isVerticalTimeline())
- ? frameAdj.y()
- : frameAdj.x();
+ ? frameAdj.y()
+ : frameAdj.x();
// get onion colors
TPixel frontPixel, backPixel;
@@ -1066,7 +1066,8 @@ void RowArea::mouseMoveEvent(QMouseEvent *event) {
return;
}
- m_row = m_viewer->xyToPosition(pos).frame();
+ m_row = std::max(0, m_viewer->xyToPosition(pos).frame());
+
int x = pos.x();
if ((event->buttons() & Qt::LeftButton) != 0 &&