Skip to content

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

C

fix color model pick mode

shun-iwasawa5396bdc192ee
diff --git a/toonz/sources/tnztools/fingertool.cpp b/toonz/sources/tnztools/fingertool.cpp
index f7b501f38..38fae90af 100644
--- a/toonz/sources/tnztools/fingertool.cpp
+++ b/toonz/sources/tnztools/fingertool.cpp
@@ -565,7 +565,7 @@ void FingerTool::pick(const TPointD &pos) {
int styleId =
picker.pickStyleId(TScale(1.0 / subsampling) * pos + TPointD(-0.5, -0.5),
- getPixelSize() * getPixelSize(), modeValue);
+ getPixelSize() * getPixelSize(), 1.0, modeValue);
if (styleId < 0) return;
diff --git a/toonz/sources/toonz/colormodelviewer.cpp b/toonz/sources/toonz/colormodelviewer.cpp
index da1626eba..6b5fb27eb 100644
--- a/toonz/sources/toonz/colormodelviewer.cpp
+++ b/toonz/sources/toonz/colormodelviewer.cpp
@@ -146,10 +146,10 @@ void ColorModelViewer::dropEvent(QDropEvent *event) {
loadImage(fp);
setLevel(fp);
}
- // Force CopyAction
- event->setDropAction(Qt::CopyAction);
- // For files, don't accept original proposed action in case it's a move
- event->accept();
+ // Force CopyAction
+ event->setDropAction(Qt::CopyAction);
+ // For files, don't accept original proposed action in case it's a move
+ event->accept();
}
}
@@ -303,11 +303,13 @@ void ColorModelViewer::pick(const QPoint &p) {
TPointD(viewP.x() - m_imageViewer->width() / 2,
-viewP.y() + m_imageViewer->height() / 2);
+ double scale2 = m_imageViewer->getViewAff().det();
/*---
カレントToolに合わせてPickモードを変更
0=Area, 1=Line, 2=Line&Areas(default)
---*/
- int styleIndex = picker.pickStyleId(pos + TPointD(-0.5, -0.5), 1, m_mode);
+ int styleIndex =
+ picker.pickStyleId(pos + TPointD(-0.5, -0.5), 1, scale2, m_mode);
if (styleIndex < 0) return;