X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetminipage.C;h=c763d727a161ec9c8ce4e2d10a9e623d1a4399de;hb=26f1a5bfcae4b7fd7b946a1884c396d842b24925;hp=ba8327fe6d1a4a4bbc62e3aa6a44aa8173c09677;hpb=be16393a7b575fbb1285547d33ea373bc5abeea8;p=lyx.git diff --git a/src/insets/insetminipage.C b/src/insets/insetminipage.C index ba8327fe6d..c763d727a1 100644 --- a/src/insets/insetminipage.C +++ b/src/insets/insetminipage.C @@ -117,14 +117,16 @@ dispatch_result InsetMinipage::localDispatch(FuncRequest const & cmd) params_.pos = params.pos; params_.width = params.width; - cmd.view()->updateInset(this, true); + // FIXME: what magical mysterious commands are actually + // needed here to update the bloody size of the inset !!! + cmd.view()->updateInset(this); result = DISPATCHED; } break; case LFUN_INSET_DIALOG_UPDATE: { InsetMinipageMailer mailer(*this); - mailer.updateDialog(); + mailer.updateDialog(cmd.view()); } break; @@ -305,69 +307,12 @@ bool InsetMinipage::insetAllowed(Inset::Code code) const } -InsetMinipage::Position InsetMinipage::pos() const -{ - return params_.pos; -} - - -void InsetMinipage::pos(InsetMinipage::Position p) -{ - if (params_.pos != p) { - params_.pos = p; - need_update = FULL; - } -} - - -InsetMinipage::InnerPosition InsetMinipage::innerPos() const -{ - return params_.inner_pos; -} - - -void InsetMinipage::innerPos(InsetMinipage::InnerPosition ip) -{ - params_.inner_pos = ip; -} - - -LyXLength const & InsetMinipage::pageHeight() const -{ - return params_.height; -} - - -void InsetMinipage::pageHeight(LyXLength const & ll) -{ - if (params_.height != ll) { - params_.height = ll; - need_update = FULL; - } -} - - -LyXLength const & InsetMinipage::pageWidth() const -{ - return params_.width; -} - - -void InsetMinipage::pageWidth(LyXLength const & ll) -{ - if (ll != params_.width) { - params_.width = ll; - need_update = FULL; - } -} - - bool InsetMinipage::showInsetDialog(BufferView * bv) const { if (!inset.showInsetDialog(bv)) { InsetMinipage * tmp = const_cast(this); InsetMinipageMailer mailer(*tmp); - mailer.showDialog(); + mailer.showDialog(bv); } return true; @@ -445,7 +390,9 @@ void InsetMinipageMailer::string2params(string const & in, return; } - params.read(lex); + if (lex.isOK()) { + params.read(lex); + } }