From koffice-devel Sat Jul 11 13:50:14 2009 From: Pierre Stirnweiss Date: Sat, 11 Jul 2009 13:50:14 +0000 To: koffice-devel Subject: Re: Communication between tools Message-Id: <200907111550.14425.pierre.stirnweiss () t-online ! de> X-MARC-Message: https://marc.info/?l=koffice-devel&m=124732025906596 Le samedi 11 juillet 2009 13:40:50, Jeremias Epperlein a écrit : > So after Thomas commits from yesterday my problems with simultaneously > active tools are gone (because this situation is impossible now). But > I still have big problems with undo and how to > notify the tool, that it should update. Because, there is actualy > always another way of changing the data > besides the active tool, and this is undo/redo (as long as tool > changes don't go on the undo stack and i don't think we want this). > > Does anybody have an idea, how to tell a tool, that it's data was > changed by a undo command? > The artistic text shape crashes, when you split view, insert a shape, > edit the text, close this view and > undo the text change in the other view, because the tool is saved in > the qundocommand but > the tool just dot deleted when closing the view. > I have no idea what the texttool does, because its undo/redo > implementation is kind of mysteriuos to me (nested QUndoCommand > classes, ...). I am currently changing the undo/redo mechanism for TextTool/koText: - up untill now, the TextTool handles the undo/redo mechanism and the KoTextSelectionHandler handles most of the editing actions. This lead (and have lead) to problems when the tool is not active. A lot of them were solved in the beta phase, but a lot of corner cases remain. - I am moving the undo/redo mechanism to a new class in KoText (called KoTextEditor). This class also replaces the KoTextSelectionHandler. There is going to be one instance of KoTextEditor per QTextDocument (contrary of the selectionHandler which was tied with the shapes). This KoTextEditor is not using the tool anymore for the undo/redo, it pushes the commands straight to the undoStack of the KoDocument. Hopefully a lot of the corner cases should get sorted. I am almost at a point where I can commit the big bulk of the change. I will probably ask for review first as it is quite substantial. Pierre > > Any comments on how to fix this? For now I will use a QObejct for my > data and emit a signal from > it to tell the tool it's data changed. > > Greetings, > Jeremias > _______________________________________________ > koffice-devel mailing list > koffice-devel@kde.org > https://mail.kde.org/mailman/listinfo/koffice-devel _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel