Merge pull request #959 from manongjohn/fix_column_rename_on_frame_edit
Fix column renaming when editing frame
This commit is contained in:
commit
49fe6b08e3
5 changed files with 15 additions and 10 deletions
|
@ -659,7 +659,8 @@ void FullColorBrushTool::leftButtonUp(const TPointD &pos,
|
|||
if (m_tileSet->getTileCount() > 0) {
|
||||
delete m_tileSaver;
|
||||
bool isEditingLevel = m_application->getCurrentFrame()->isEditingLevel();
|
||||
if (!isEditingLevel) TUndoManager::manager()->beginBlock();
|
||||
bool renameColumn = m_isFrameCreated;
|
||||
if (!isEditingLevel && renameColumn) TUndoManager::manager()->beginBlock();
|
||||
TTool::Application *app = TTool::getApplication();
|
||||
TXshLevel *level = app->getCurrentLevel()->getLevel();
|
||||
TXshSimpleLevelP simLevel = level->getSimpleLevel();
|
||||
|
@ -670,7 +671,7 @@ void FullColorBrushTool::leftButtonUp(const TPointD &pos,
|
|||
m_strokeRect.getP00()));
|
||||
|
||||
// Column name renamed to level name only if was originally empty
|
||||
if (!isEditingLevel) {
|
||||
if (!isEditingLevel && renameColumn) {
|
||||
int col = app->getCurrentColumn()->getColumnIndex();
|
||||
TXshColumn *column = app->getCurrentXsheet()->getXsheet()->getColumn(col);
|
||||
int r0, r1;
|
||||
|
|
|
@ -1260,12 +1260,13 @@ public:
|
|||
if (!m_active) return;
|
||||
|
||||
bool isEditingLevel = m_application->getCurrentFrame()->isEditingLevel();
|
||||
if (!isEditingLevel) TUndoManager::manager()->beginBlock();
|
||||
bool renameColumn = m_isFrameCreated;
|
||||
if (!isEditingLevel && renameColumn) TUndoManager::manager()->beginBlock();
|
||||
|
||||
if (m_primitive) m_primitive->leftButtonUp(p, e);
|
||||
|
||||
// Column name renamed to level name only if was originally empty
|
||||
if (!isEditingLevel) {
|
||||
if (!isEditingLevel && renameColumn) {
|
||||
int col = m_application->getCurrentColumn()->getColumnIndex();
|
||||
TXshColumn *column =
|
||||
m_application->getCurrentXsheet()->getXsheet()->getColumn(col);
|
||||
|
|
|
@ -1861,7 +1861,8 @@ void ToonzRasterBrushTool::finishRasterBrush(const TPointD &pos,
|
|||
TXshSimpleLevelP simLevel = level->getSimpleLevel();
|
||||
|
||||
bool isEditingLevel = m_application->getCurrentFrame()->isEditingLevel();
|
||||
if (!isEditingLevel) TUndoManager::manager()->beginBlock();
|
||||
bool renameColumn = m_isFrameCreated;
|
||||
if (!isEditingLevel && renameColumn) TUndoManager::manager()->beginBlock();
|
||||
|
||||
/*--
|
||||
* 描画中にカレントフレームが変わっても、描画開始時のFidに対してUndoを記録する
|
||||
|
@ -2087,7 +2088,7 @@ void ToonzRasterBrushTool::finishRasterBrush(const TPointD &pos,
|
|||
}
|
||||
|
||||
// Column name renamed to level name only if was originally empty
|
||||
if (!isEditingLevel) {
|
||||
if (!isEditingLevel && renameColumn) {
|
||||
int col = app->getCurrentColumn()->getColumnIndex();
|
||||
TXshColumn *column = app->getCurrentXsheet()->getXsheet()->getColumn(col);
|
||||
int r0, r1;
|
||||
|
|
|
@ -1148,7 +1148,8 @@ void ToonzVectorBrushTool::leftButtonUp(const TPointD &pos,
|
|||
stroke->insertControlPoints(0.5);
|
||||
|
||||
bool isEditingLevel = m_application->getCurrentFrame()->isEditingLevel();
|
||||
if (!isEditingLevel) TUndoManager::manager()->beginBlock();
|
||||
bool renameColumn = m_isFrameCreated;
|
||||
if (!isEditingLevel && renameColumn) TUndoManager::manager()->beginBlock();
|
||||
|
||||
if (m_frameRange.getIndex()) {
|
||||
if (m_firstFrameId == -1) {
|
||||
|
@ -1257,7 +1258,7 @@ void ToonzVectorBrushTool::leftButtonUp(const TPointD &pos,
|
|||
}
|
||||
|
||||
// Column name renamed to level name only if was originally empty
|
||||
if (!isEditingLevel) {
|
||||
if (!isEditingLevel && renameColumn) {
|
||||
int col = getApplication()->getCurrentColumn()->getColumnIndex();
|
||||
TXshColumn *column =
|
||||
getApplication()->getCurrentXsheet()->getXsheet()->getColumn(col);
|
||||
|
|
|
@ -733,13 +733,14 @@ void TypeTool::stopEditing() {
|
|||
invalidate();
|
||||
if (m_undo) {
|
||||
bool isEditingLevel = getApplication()->getCurrentFrame()->isEditingLevel();
|
||||
if (!isEditingLevel) TUndoManager::manager()->beginBlock();
|
||||
bool renameColumn = m_isFrameCreated;
|
||||
if (!isEditingLevel && renameColumn) TUndoManager::manager()->beginBlock();
|
||||
|
||||
TUndoManager::manager()->add(m_undo);
|
||||
m_undo = 0;
|
||||
|
||||
// Column name renamed to level name only if was originally empty
|
||||
if (!isEditingLevel) {
|
||||
if (!isEditingLevel && renameColumn) {
|
||||
int col = getApplication()->getCurrentColumn()->getColumnIndex();
|
||||
TXshColumn *column =
|
||||
getApplication()->getCurrentXsheet()->getXsheet()->getColumn(col);
|
||||
|
|
Loading…
Reference in a new issue