Changeset View
Changeset View
Standalone View
Standalone View
plugins/flake/textshape/kotext/KoTextEditor_undo.cpp
Context not available. | |||||
169 | } | 169 | } | ||
---|---|---|---|---|---|
170 | if (newState == NoOp && !commandStack.isEmpty()) { | 170 | if (newState == NoOp && !commandStack.isEmpty()) { | ||
171 | //Calling updateState to NoOp when the commandStack isn't empty means that the current headCommand on the commandStack is finished. Further UndoTextCommands do not belong to it. So we pop it. | 171 | //Calling updateState to NoOp when the commandStack isn't empty means that the current headCommand on the commandStack is finished. Further UndoTextCommands do not belong to it. So we pop it. | ||
172 | //If after poping the headCommand we still have some commands on the commandStack means we have not finished with the highest "macro". In that case we need to stay in the "Custom" state. | 172 | //If after popping the headCommand we still have some commands on the commandStack means we have not finished with the highest "macro". In that case we need to stay in the "Custom" state. | ||
173 | //On the contrary, an empty commandStack means we have finished with the "macro". In that case, we set the editor to NoOp state. A signal from the QTextDocument should also generate a new headCommand. | 173 | //On the contrary, an empty commandStack means we have finished with the "macro". In that case, we set the editor to NoOp state. A signal from the QTextDocument should also generate a new headCommand. | ||
174 | debugText << "we are in a macro and update the state to NoOp. this means that the command on top of the commandStack is finished. we should pop it"; | 174 | debugText << "we are in a macro and update the state to NoOp. this means that the command on top of the commandStack is finished. we should pop it"; | ||
175 | debugText << "commandStack count before: " << commandStack.count(); | 175 | debugText << "commandStack count before: " << commandStack.count(); | ||
Context not available. |