mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
Backport trunk fix http://www.lyx.org/trac/changeset/27780 for bug http://bugzilla.lyx.org/show_bug.cgi?id=5389 . git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28255 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
27b31deff5
commit
a13b78cf3c
@ -1784,14 +1784,17 @@ void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd
|
||||
|
||||
void LyXFunc::reloadBuffer()
|
||||
{
|
||||
Buffer * buf = lyx_view_->buffer();
|
||||
FileName filename = buf->fileName();
|
||||
FileName filename = lyx_view_->buffer()->fileName();
|
||||
// The user has already confirmed that the changes, if any, should
|
||||
// be discarded. So we just reread the file and don't call closeBuffer();
|
||||
bool const success = buf->readFile(filename);
|
||||
// be discarded. So we just release the Buffer and don't call closeBuffer();
|
||||
theBufferList().release(lyx_view_->buffer());
|
||||
// if the lyx_view_ has been destroyed, create a new one
|
||||
if (!lyx_view_)
|
||||
theApp()->dispatch(FuncRequest(LFUN_WINDOW_NEW));
|
||||
Buffer * buf = lyx_view_->loadDocument(filename);
|
||||
docstring const disp_fn = makeDisplayPath(filename.absFilename());
|
||||
docstring str;
|
||||
if (buf && success) {
|
||||
if (buf) {
|
||||
updateLabels(*buf);
|
||||
lyx_view_->setBuffer(buf);
|
||||
buf->errors("Parse");
|
||||
|
@ -181,6 +181,9 @@ What's new
|
||||
|
||||
- Fix a locale debug message.
|
||||
|
||||
- Fix reloading bug for RCS revision control introduced in 1.6.1, backport
|
||||
trunk fix for bug 5389 (bug 5697)
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user