But is this to be used only in the styleManager dialog then? What for, the preview?<br><br><br><div class="gmail_quote">On Wed, May 23, 2012 at 2:52 PM, C. Boemann <span dir="ltr"><<a href="mailto:cbo@boemann.dk" target="_blank">cbo@boemann.dk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On Wednesday 23 May 2012 14:42:52 Pierre Stirnweiss wrote:<br>
> I am not now in a position to do a proper review for the moment. However a<br>
> couple of questions:<br>
><br>
> - what is it you are trying to do with these "other" paragraph styles?<br>
> - why inserting them is not done through the kotext's styleManager like the<br>
> "standard" paragraph styles and directly into the model?<br>
> - playing around with the model's returned data (from 2 different style<br>
> lists) should be done with extreme care (inside beginInsert, beginMove,...<br>
> and the like). You might get updating problems in the views otherwise<br>
><br>
> PierreSt<br>
<br>
</div>Basically because the styles are not supposed to be in the KoStyleManager<br>
until the user presses Apply/Ok<br>
<br>
We could have a pre insert list in KoStyleManager but that just sounds even<br>
weirder. They would then be available from other dialogs to be inserted into<br>
the document, and if the user then selects Cancel we have a problem. Not to<br>
speak of the undo commands being generated.<br>
<br>
I'm convinced this is the right approach - to do it in the model.<br>
<br>
We may have to protect like you say, but as addNew* calls the normal method<br>
and just makes sure that any fetching also tries this alternative way of<br>
fetching the style I don't see how this can be any worse than fetching from<br>
the styleManager alone<br>
<span class="HOEnZb"><font color="#888888"><br>
boemann<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
calligra-devel mailing list<br>
<a href="mailto:calligra-devel@kde.org">calligra-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/calligra-devel" target="_blank">https://mail.kde.org/mailman/listinfo/calligra-devel</a><br>
</div></div></blockquote></div><br>