fix animate tool availability (#2780)

This commit is contained in:
shun-iwasawa 2019-09-24 12:23:46 +09:00 committed by GitHub
parent 831596b689
commit d40c362a62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -603,7 +603,7 @@ void TTool::notifyImageChanged() {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/*! Notify change of image in \b fid: update icon and notify level change. /*! Notify change of image in \b fid: update icon and notify level change.
*/ */
void TTool::notifyImageChanged(const TFrameId &fid) { void TTool::notifyImageChanged(const TFrameId &fid) {
onImageChanged(); onImageChanged();
@ -847,6 +847,17 @@ QString TTool::updateEnabled() {
(m_name == T_Type || m_name == T_Geometric || m_name == T_Brush)) (m_name == T_Type || m_name == T_Geometric || m_name == T_Brush))
return (enable(false), QString()); return (enable(false), QString());
// In case of Animate Tool
if (m_name == T_Edit && !filmstrip) {
// if an object other than column is selected, then enable the tool
// regardless of the current column state
if (!m_application->getCurrentObject()->getObjectId().isColumn())
return (enable(true), QString());
// if a column object is selected, switch the inspected column to it
column = xsh->getColumn(
m_application->getCurrentObject()->getObjectId().getIndex());
}
// Check against unplaced columns (not in filmstrip mode) // Check against unplaced columns (not in filmstrip mode)
if (column && !filmstrip) { if (column && !filmstrip) {
if (column->isLocked()) if (column->isLocked())