fixed delete undo.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
cmdExtern //??
|
||||
};
|
||||
|
||||
XQCommand(CmdType cmdType, XQViewModel* modelView );
|
||||
XQCommand(CmdType cmdType, XQViewModel* viewModel );
|
||||
virtual ~XQCommand();
|
||||
|
||||
CmdType commandType() const;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user