mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
GuiDocument: do not ask switch-back question on document closing
(cherry picked from commit c243126eb4
)
This commit is contained in:
parent
234dc0b6b2
commit
ce88e46a3d
@ -27,6 +27,7 @@
|
|||||||
#include "BranchList.h"
|
#include "BranchList.h"
|
||||||
#include "buffer_funcs.h"
|
#include "buffer_funcs.h"
|
||||||
#include "Buffer.h"
|
#include "Buffer.h"
|
||||||
|
#include "BufferList.h"
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "CiteEnginesList.h"
|
#include "CiteEnginesList.h"
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
@ -1881,6 +1882,7 @@ void GuiDocument::onBufferViewChanged()
|
|||||||
// And ideally, we should propose to apply without having to switch back
|
// And ideally, we should propose to apply without having to switch back
|
||||||
// (e.g., via a LFUN_BUFFER_PARAMS_APPLY_OTHER)
|
// (e.g., via a LFUN_BUFFER_PARAMS_APPLY_OTHER)
|
||||||
if (!prev_buffer_filename_.empty() && prev_buffer_filename_ != new_filename
|
if (!prev_buffer_filename_.empty() && prev_buffer_filename_ != new_filename
|
||||||
|
&& theBufferList().exists(FileName(prev_buffer_filename_))
|
||||||
&& buttonBox->button(QDialogButtonBox::Apply)->isEnabled()) {
|
&& buttonBox->button(QDialogButtonBox::Apply)->isEnabled()) {
|
||||||
// Only ask if we haven't yet in this cycle
|
// Only ask if we haven't yet in this cycle
|
||||||
int const ret = prompted_ ? 3 : Alert::prompt(_("Unapplied changes"),
|
int const ret = prompted_ ? 3 : Alert::prompt(_("Unapplied changes"),
|
||||||
|
Loading…
Reference in New Issue
Block a user