Hi, I noticed that for instance the Hyperlink Dialog loses all information when clicking on the main buffer. The same occurs with the Include Child Document Dialog and probably also others. Do you agree on this being less intuitive ? If so, I included a small patch that will fix this for the two dialogs mentioned. I just adapted them to the design of the GuiGraphics Dialog. Vincent
Index: src/frontends/qt4/GuiHyperlink.cpp =================================================================== --- src/frontends/qt4/GuiHyperlink.cpp (revision 26082) +++ src/frontends/qt4/GuiHyperlink.cpp (working copy) @@ -62,7 +62,7 @@ } -void GuiHyperlink::updateContents() +void GuiHyperlink::paramsToDialog(InsetCommandParams const & icp) { targetED->setText(toqstr(params_["target"])); nameED->setText(toqstr(params_["name"])); @@ -101,6 +101,7 @@ // The name passed with LFUN_INSET_APPLY is also the name // used to identify the mailer. InsetCommand::string2params("href", data, params_); + paramsToDialog(params_); return true; }
Index: src/frontends/qt4/GuiHyperlink.h =================================================================== --- src/frontends/qt4/GuiHyperlink.h (revision 26082) +++ src/frontends/qt4/GuiHyperlink.h (working copy) @@ -38,9 +38,11 @@ /// apply dialog void applyView(); /// update dialog - void updateContents(); + void updateContents() { }; /// bool initialiseParams(std::string const & data); + /// + void paramsToDialog(InsetCommandParams const & icp); /// clean-up on hide. void clearParams() { params_.clear(); } /// clean-up on hide. Index: src/frontends/qt4/GuiInclude.cpp =================================================================== --- src/frontends/qt4/GuiInclude.cpp (revision 26082) +++ src/frontends/qt4/GuiInclude.cpp (working copy) @@ -167,5 +167,5 @@ -void GuiInclude::updateContents() +void GuiInclude::paramsToDialog(InsetCommandParams const & params_) { filenameED->setText(toqstr(params_["filename"])); @@ -329,6 +329,7 @@ bool GuiInclude::initialiseParams(std::string const & data) { InsetCommand::string2params("include", data, params_); + paramsToDialog(params_); return true; } Index: src/frontends/qt4/GuiInclude.h =================================================================== --- src/frontends/qt4/GuiInclude.h (revision 26082) +++ src/frontends/qt4/GuiInclude.h (working copy) @@ -48,6 +48,8 @@ private: /// bool initialiseParams(std::string const & data); + /// + void paramsToDialog(InsetCommandParams const & params_); /// clean-up on hide. void clearParams() { params_.clear(); } /// clean-up on hide. @@ -75,7 +77,7 @@ /// Apply changes void applyView(); /// update - void updateContents(); + void updateContents() { }; /// Browse for a file QString browse(QString const &, Type) const;