mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix bug 2212: First change is skipped in Merge changes... dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13331 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58408d2362
commit
b557e3790e
@ -922,12 +922,7 @@ void BufferView::Pimpl::trackChanges()
|
||||
buffer_->undostack().clear();
|
||||
} else {
|
||||
cursor_.setCursor(doc_iterator_begin(buffer_->inset()));
|
||||
bool const found = lyx::find::findNextChange(bv_);
|
||||
if (found) {
|
||||
// We reset the cursor to the start of the
|
||||
// document, since the Changes Dialog is going
|
||||
// to search for the next change anyway.
|
||||
cursor_.setCursor(doc_iterator_begin(buffer_->inset()));
|
||||
if (lyx::find::findNextChange(bv_)) {
|
||||
owner_->getDialogs().show("changes");
|
||||
return;
|
||||
}
|
||||
@ -1228,7 +1223,8 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
case LFUN_MERGE_CHANGES:
|
||||
owner_->getDialogs().show("changes");
|
||||
if (lyx::find::findNextChange(bv_))
|
||||
owner_->getDialogs().show("changes");
|
||||
break;
|
||||
|
||||
case LFUN_ACCEPT_ALL_CHANGES: {
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* BufferView_pimpl.C: fix bug 2212: First change is skipped is
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-03-10 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* bufferparams.C (writeLaTeX): define \labelitemi with \def. Fixes LaTeX
|
||||
@ -6,7 +11,7 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* BufferView.[Ch]:
|
||||
* BufferView_pimpl.[Ch]:
|
||||
* BufferView_pimpl.[Ch]:
|
||||
* LyXAction.C:
|
||||
* debug.[Ch]:
|
||||
* rowpainter.C:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* ControlChanges.C: fix bug 2212: First change is skipped in
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-03-07 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* tests/pch.h: fix nullstream.hpp location for boost 1.33.0
|
||||
|
@ -39,6 +39,13 @@ bool ControlChanges::find()
|
||||
}
|
||||
|
||||
|
||||
bool ControlChanges::changed()
|
||||
{
|
||||
Change c(kernel().bufferview()->getCurrentChange());
|
||||
return c.type != Change::UNCHANGED;
|
||||
}
|
||||
|
||||
|
||||
string const ControlChanges::getChangeDate()
|
||||
{
|
||||
Change c(kernel().bufferview()->getCurrentChange());
|
||||
|
@ -38,6 +38,9 @@ public:
|
||||
/// find the next merge chunk and highlight it
|
||||
bool find();
|
||||
|
||||
/// Are there changes to be merged at current location?
|
||||
bool changed();
|
||||
|
||||
/// return date of change
|
||||
std::string const getChangeDate();
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* GChanges.C: fix bug 2212: First change is skipped in
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-02-20 John Spray <spray@lyx.org>
|
||||
* glade/documents.glade: change "page style" to "page numbering"
|
||||
in UI.
|
||||
|
@ -63,7 +63,10 @@ void GChanges::doBuild()
|
||||
|
||||
void GChanges::update()
|
||||
{
|
||||
onNext();
|
||||
if (controller().changed())
|
||||
promptChange();
|
||||
else
|
||||
promptDismiss();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* QChanges.C: fix bug 2212: First change is skipped in
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-03-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
|
||||
|
@ -50,14 +50,6 @@ void QChanges::build_dialog()
|
||||
|
||||
void QChanges::update_contents()
|
||||
{
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
void QChanges::next()
|
||||
{
|
||||
controller().find();
|
||||
|
||||
string text;
|
||||
string author(controller().getChangeAuthor());
|
||||
string date(controller().getChangeDate());
|
||||
@ -71,6 +63,13 @@ void QChanges::next()
|
||||
}
|
||||
|
||||
|
||||
void QChanges::next()
|
||||
{
|
||||
controller().find();
|
||||
update_contents();
|
||||
}
|
||||
|
||||
|
||||
void QChanges::accept()
|
||||
{
|
||||
controller().accept();
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* FormChanges.C: fix bug 2212: First change is skipped in
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormCitation.C (input): get rid of the iterator.
|
||||
|
@ -48,35 +48,32 @@ void FormChanges::build()
|
||||
|
||||
void FormChanges::update()
|
||||
{
|
||||
input(dialog_->button_next, 0);
|
||||
if (!dialog_.get()) return;
|
||||
bool exist = controller().changed();
|
||||
setEnabled(dialog_->button_accept, exist);
|
||||
setEnabled(dialog_->button_reject, exist);
|
||||
setEnabled(dialog_->button_next, exist);
|
||||
|
||||
string const author = exist ? controller().getChangeAuthor() : "";
|
||||
fl_set_object_label(dialog_->text_author, author.c_str());
|
||||
|
||||
string const date = exist ? controller().getChangeDate() : "";
|
||||
fl_set_object_label(dialog_->text_date, date.c_str());
|
||||
|
||||
// Yes, this is needed.
|
||||
fl_redraw_form(form());
|
||||
}
|
||||
|
||||
|
||||
ButtonPolicy::SMInput FormChanges::input(FL_OBJECT * obj, long)
|
||||
{
|
||||
if (obj == dialog_->button_accept) {
|
||||
if (obj == dialog_->button_accept)
|
||||
controller().accept();
|
||||
|
||||
} else if (obj == dialog_->button_reject) {
|
||||
else if (obj == dialog_->button_reject)
|
||||
controller().reject();
|
||||
|
||||
} else if (obj == dialog_->button_next) {
|
||||
|
||||
bool const exist = controller().find();
|
||||
setEnabled(dialog_->button_accept, exist);
|
||||
setEnabled(dialog_->button_reject, exist);
|
||||
setEnabled(dialog_->button_next, exist);
|
||||
|
||||
string const author = exist ? controller().getChangeAuthor() : "";
|
||||
fl_set_object_label(dialog_->text_author, author.c_str());
|
||||
|
||||
string const date = exist ? controller().getChangeDate() : "";
|
||||
fl_set_object_label(dialog_->text_date, date.c_str());
|
||||
|
||||
// Yes, this is needed.
|
||||
fl_redraw_form(form());
|
||||
}
|
||||
|
||||
else if (obj == dialog_->button_next)
|
||||
controller().find();
|
||||
update();
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user