private void OnUndoRedoManagerChanged_TextNodeStructureEditCommand(UndoRedoManagerEventArgs eventt, bool done, TextNodeStructureEditCommand command, bool isTransactionEndEvent, bool isNoTransactionOrTrailingEdge) { DebugFix.Assert(command is TreeNodeInsertCommand || command is TreeNodeRemoveCommand); //TreeNode node = (command is TreeNodeInsertCommand) ? ((TreeNodeInsertCommand)command).TreeNode : ((TreeNodeRemoveCommand)command).TreeNode; //TreeNode node = command.TreeNode; //bool forceInvalidate = (command is TreeNodeInsertCommand && !done) || (command is TreeNodeRemoveCommand && done); //bool done_ = (command is TreeNodeInsertCommand) ? !done : done; if (isNoTransactionOrTrailingEdge) { View.UnloadProject(); HeadingsNavigator = null; HeadingsNavigator = new HeadingsNavigator(m_session.DocumentProject, this); View.LoadProject(); } }
private void OnUndoRedoManagerChanged_TextNodeStructureEditCommand(UndoRedoManagerEventArgs eventt, bool done, TextNodeStructureEditCommand command, bool isTransactionEndEvent, bool isNoTransactionOrTrailingEdge) { DebugFix.Assert(command is TreeNodeInsertCommand || command is TreeNodeRemoveCommand); //TreeNode node = (command is TreeNodeInsertCommand) ? ((TreeNodeInsertCommand)command).TreeNode : ((TreeNodeRemoveCommand)command).TreeNode; TreeNode node = command.TreeNode; bool forceInvalidate = (command is TreeNodeInsertCommand && !done) || (command is TreeNodeRemoveCommand && done); InvalidatePages(forceInvalidate, node); bool done_ = (command is TreeNodeInsertCommand) ? !done : done; checkTreeNodeFragmentRemoval(done_, node); }