Part of r32942. We want to avoid reload flickering when

user canceled commiting dialog.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg156936.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32956 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-01-10 21:18:41 +00:00
parent 5261a21e72
commit ddfb49a4f0

View File

@ -160,13 +160,18 @@ bool LyXVC::registrer()
string LyXVC::checkIn() string LyXVC::checkIn()
{ {
LYXERR(Debug::LYXVC, "LyXVC: checkIn"); LYXERR(Debug::LYXVC, "LyXVC: checkIn");
docstring empty(_("(no log message)"));
docstring response; docstring response;
string log; string log;
bool ok = Alert::askForText(response, _("LyX VC: Log Message")); bool ok = Alert::askForText(response, _("LyX VC: Log Message"));
if (ok) { if (ok) {
if (response.empty()) if (response.empty())
response = _("(no log message)"); response = empty;
log = vcs->checkIn(to_utf8(response)); log = vcs->checkIn(to_utf8(response));
// Reserve empty string for cancel button
if (log.empty())
log = to_utf8(empty);
} else { } else {
LYXERR(Debug::LYXVC, "LyXVC: user cancelled"); LYXERR(Debug::LYXVC, "LyXVC: user cancelled");
} }