OpenToonz - An open-source full-featured 2D animation creation software
C
Enhance note level LineEdit
Abel Youce848a2efbe7
diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cppindex 437de250e..078568ceb 100644--- a/toonz/sources/toonz/xshcellviewer.cpp+++ b/toonz/sources/toonz/xshcellviewer.cpp@@ -694,10 +694,22 @@ void RenameCellField::showInRowCol(int row, int col, bool multiColumnSelected) {if (cell.m_level->getType() == TXshLevelType::SND_TXT_XSHLEVEL) {TXshSoundTextLevelP textLevel = cell.m_level->getSoundTextLevel();if (textLevel) {- std::string frameText =- textLevel->getFrameText(fid.getNumber() - 1).toStdString();setText(textLevel->getFrameText(fid.getNumber() - 1));}+ setAlignment(Qt::AlignLeft | Qt::AlignBottom);+ QFontMetrics fm(this->font());+ if (o->cellWidth() - 15 < fm.horizontalAdvance(text()))+ setFixedWidth(fm.horizontalAdvance(text()) + 10);+ else+ setFixedSize(o->cellWidth(), o->cellHeight() + 2);+ connect(this, &QLineEdit::textChanged, this,+ [this,o,fm](const QString &text) {+ if (o->cellWidth()-15 < fm.horizontalAdvance(text))+ setFixedWidth(fm.horizontalAdvance(text)+10);+ });+ connect(this, &QLineEdit::close, m_viewer,+ [this] { m_viewer->setFocusPolicy(Qt::WheelFocus);+ });}// other level typeselse {