X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiRef.cpp;h=cdb6e59c9440da780fd3add1b48427648fd03c20;hb=50de85396c785a454fe07b77d815c57f3e462282;hp=bf08efcc9ce338c848159b15b2da85f1a37e0c96;hpb=94e61a3bc9c136554afd8f23fd4d49c2f4e394ba;p=lyx.git diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index bf08efcc9c..cdb6e59c94 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -88,7 +88,7 @@ GuiRefDialog::GuiRefDialog(LyXView & lv) } -ControlRef & GuiRefDialog::controller() const +ControlRef & GuiRefDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -107,7 +107,7 @@ void GuiRefDialog::gotoClicked() void GuiRefDialog::selectionChanged() { - if (readOnly()) + if (controller().isBufferReadonly()) return; QList selections = refsLW->selectedItems(); @@ -121,7 +121,7 @@ void GuiRefDialog::selectionChanged() void GuiRefDialog::refHighlighted(QListWidgetItem * sel) { - if (readOnly()) + if (controller().isBufferReadonly()) return; /* int const cur_item = refsLW->currentRow(); @@ -144,7 +144,7 @@ void GuiRefDialog::refHighlighted(QListWidgetItem * sel) void GuiRefDialog::refSelected(QListWidgetItem * sel) { - if (readOnly()) + if (controller().isBufferReadonly()) return; /* int const cur_item = refsLW->currentRow(); @@ -181,13 +181,13 @@ void GuiRefDialog::reset_dialog() void GuiRefDialog::closeEvent(QCloseEvent * e) { - slotWMHide(); + slotClose(); reset_dialog(); e->accept(); } -void GuiRefDialog::update_contents() +void GuiRefDialog::updateContents() { InsetCommandParams const & params = controller().params(); @@ -196,14 +196,14 @@ void GuiRefDialog::update_contents() referenceED->setText(toqstr(params["reference"])); nameED->setText(toqstr(params["name"])); - nameED->setReadOnly(!nameAllowed() && !readOnly()); + nameED->setReadOnly(!nameAllowed() && !controller().isBufferReadonly()); // restore type settings for new insets if (params["reference"].empty()) typeCO->setCurrentIndex(orig_type); else typeCO->setCurrentIndex(InsetRef::getType(params.getCmdName())); - typeCO->setEnabled(typeAllowed() && !readOnly()); + typeCO->setEnabled(typeAllowed() && !controller().isBufferReadonly()); if (!typeAllowed()) typeCO->setCurrentIndex(0);