mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
get rid of GuiWorkArea::Private::setReadOnly(). Calling updateWindowTitle() is cheap compared to redraw and GuiView::updateDialogs() will be called anyway (with restartCursor() among others).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39880 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
668ef9c365
commit
e621339aae
@ -237,7 +237,7 @@ SyntheticMouseEvent::SyntheticMouseEvent()
|
||||
|
||||
|
||||
GuiWorkArea::Private::Private(GuiWorkArea * parent)
|
||||
: p(parent), buffer_view_(0), read_only_(false), lyx_view_(0), cursor_visible_(false),
|
||||
: p(parent), buffer_view_(0), lyx_view_(0), cursor_visible_(false),
|
||||
need_resize_(false), schedule_redraw_(false), preedit_lines_(1),
|
||||
completer_(new GuiCompleter(p, p))
|
||||
{
|
||||
@ -253,7 +253,6 @@ GuiWorkArea::GuiWorkArea(QWidget * /* w */)
|
||||
GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv)
|
||||
: d(new Private(this))
|
||||
{
|
||||
d->read_only_ = buffer.isReadonly();
|
||||
setGuiView(gv);
|
||||
setBuffer(buffer);
|
||||
init();
|
||||
@ -476,7 +475,7 @@ void GuiWorkArea::redraw(bool update_metrics)
|
||||
if (lyxerr.debugging(Debug::WORKAREA))
|
||||
d->buffer_view_->coordCache().dump();
|
||||
|
||||
d->setReadOnly(d->buffer_view_->buffer().isReadonly());
|
||||
updateWindowTitle();
|
||||
|
||||
d->updateCursorShape();
|
||||
}
|
||||
@ -1349,17 +1348,6 @@ void GuiWorkArea::updateWindowTitle()
|
||||
}
|
||||
|
||||
|
||||
void GuiWorkArea::Private::setReadOnly(bool read_only)
|
||||
{
|
||||
if (read_only_ == read_only)
|
||||
return;
|
||||
read_only_ = read_only;
|
||||
p->updateWindowTitle();
|
||||
if (p == lyx_view_->currentWorkArea())
|
||||
lyx_view_->updateDialogs();
|
||||
}
|
||||
|
||||
|
||||
bool GuiWorkArea::isFullScreen() const
|
||||
{
|
||||
return d->lyx_view_ && d->lyx_view_->isFullScreen();
|
||||
|
@ -105,9 +105,6 @@ struct GuiWorkArea::Private
|
||||
|
||||
/// hide the cursor
|
||||
virtual void removeCursor();
|
||||
|
||||
/// This function should be called to update the buffer readonly status.
|
||||
void setReadOnly(bool);
|
||||
///
|
||||
void dispatch(FuncRequest const & cmd0, KeyModifier = NoModifier);
|
||||
/// hide the visible cursor, if it is visible
|
||||
|
Loading…
Reference in New Issue
Block a user