fixed delete undo.

This commit is contained in:
2025-09-07 15:46:01 +02:00
parent 50703a4c44
commit 3ac129ef26
11 changed files with 40 additions and 86 deletions

View File

@@ -28,10 +28,10 @@ void XQNodeStore::dumpList( const QString& title ) const
}
//! kostruktor. übergibt command-type und die aufrufende modelView.
//! kostruktor. übergibt command-type und die aufrufende viewModel.
XQCommand::XQCommand(CmdType cmdType, XQViewModel* modelView )
: _cmdType{ cmdType }, _viewModel(modelView)
XQCommand::XQCommand(CmdType cmdType, XQViewModel* viewModel )
: _cmdType{ cmdType }, _viewModel(viewModel)
{
}

View File

@@ -66,7 +66,7 @@ public:
cmdExtern //??
};
XQCommand(CmdType cmdType, XQViewModel* modelView );
XQCommand(CmdType cmdType, XQViewModel* viewModel );
virtual ~XQCommand();
CmdType commandType() const;

View File

@@ -130,9 +130,6 @@ const XQModelSection& XQSectionManager::sectionByRow(int itemRow ) const
if( _sections.size() > 0)
{
// shortcut für die erste position
// wir gehen rückwärts, weil wir da nur einen vergleich brauchen
// und uns den test mit lastRow() sparen können.
@@ -142,7 +139,6 @@ const XQModelSection& XQSectionManager::sectionByRow(int itemRow ) const
if ( _sections.at(i).startIndex().row() < itemRow )
return _sections.at(i);
}
}
throw XQException( "No section for item row: ", QString::number(itemRow));

View File

@@ -133,9 +133,7 @@ void XQViewModel::initModel(const QString& modelName)
*/
setObjectName( modelName );
qDebug() << " --- initModel: " << objectName();
// model rootnode finden -> <DocumentTreeModel>
// model rootnode finden -> <DocumentTreeModel>
XQNodePtr modelSheet = _itemFactory.findModelSheet( modelName ); // throws
// #1: über alle sections
@@ -479,6 +477,7 @@ void XQViewModel::cmdDeleteUndo( const XQCommand& command )
{
qDebug() << " --- delete UNDo: " << entry.contentNode->friendly_name();
}
cmdCutUndo(command);
}