Skip to content

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

C

#assistants: tune column selection

Ivan Mahonin0f9df304da3d
diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp
index df1271bb3..fb7f6fbcd 100644
--- a/toonz/sources/toonz/xshcolumnviewer.cpp
+++ b/toonz/sources/toonz/xshcolumnviewer.cpp
@@ -2343,10 +2343,7 @@ void ColumnArea::mousePressEvent(QMouseEvent *event) {
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
return;
}
- // set the clicked column to current
- else
- m_viewer->setCurrentColumn(m_col);
-
+
TXshColumn *column = xsh->getColumn(m_col);
bool isEmpty = !column || column->isEmpty();
TApp::instance()->getCurrentObject()->setIsSpline(false);
@@ -2358,6 +2355,24 @@ void ColumnArea::mousePressEvent(QMouseEvent *event) {
// int y = event->pos().y();
// QPoint mouseInCell(x, y);
int x = mouseInCell.x(), y = mouseInCell.y();
+
+ // don't make column current when click on some of its toggle buttons
+ bool needMakeColumnCurrent = true;
+ if ( o->rect(PredefinedRect::LOCK_AREA).contains(mouseInCell)
+ || o->rect(PredefinedRect::CONFIG_AREA).contains(mouseInCell) )
+ needMakeColumnCurrent = false;
+ if ( Preferences::instance()->isUnifyColumnVisibilityTogglesEnabled() ) {
+ if ( o->rect(PredefinedRect::UNIFIEDVIEW_LAYER_AREA).contains(mouseInCell) )
+ needMakeColumnCurrent = false;
+ } else {
+ if ( o->rect(PredefinedRect::EYE_AREA).contains(mouseInCell)
+ || o->rect(PredefinedRect::PREVIEW_LAYER_AREA).contains(mouseInCell) )
+ needMakeColumnCurrent = false;
+ }
+
+ // set the clicked column to current
+ if (needMakeColumnCurrent)
+ m_viewer->setCurrentColumn(m_col);
// clicking on the camera column
if (m_col < 0) {