mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
fix bug 2212: First change is skipped in Merge changes... dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13332 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
08323de6c6
commit
21cc9c2795
@ -907,12 +907,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;
|
||||
}
|
||||
@ -1213,6 +1208,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
case LFUN_MERGE_CHANGES:
|
||||
if (lyx::find::findNextChange(bv_))
|
||||
owner_->getDialogs().show("changes");
|
||||
break;
|
||||
|
||||
|
@ -4142,6 +4142,11 @@
|
||||
|
||||
2004-02-06 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* BufferView_pimpl.C: fix bug 2212: First change is skipped is
|
||||
"Merge changes..." dialog
|
||||
|
||||
2006-03-10 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* BufferView.[Ch]:
|
||||
* BufferView_pimpl.[Ch]:
|
||||
* text3.C: move some text specific LFUN handling
|
||||
|
@ -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
|
||||
|
||||
2005-12-12 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* ControlPrefs.[Ch]: new helper functions toPaperSize and
|
||||
|
@ -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,21 +48,8 @@ void FormChanges::build()
|
||||
|
||||
void FormChanges::update()
|
||||
{
|
||||
input(dialog_->button_next, 0);
|
||||
}
|
||||
|
||||
|
||||
ButtonPolicy::SMInput FormChanges::input(FL_OBJECT * obj, long)
|
||||
{
|
||||
if (obj == dialog_->button_accept) {
|
||||
controller().accept();
|
||||
|
||||
} else if (obj == dialog_->button_reject) {
|
||||
controller().reject();
|
||||
|
||||
} else if (obj == dialog_->button_next) {
|
||||
|
||||
bool const exist = controller().find();
|
||||
if (!dialog_.get()) return;
|
||||
bool exist = controller().changed();
|
||||
setEnabled(dialog_->button_accept, exist);
|
||||
setEnabled(dialog_->button_reject, exist);
|
||||
setEnabled(dialog_->button_next, exist);
|
||||
@ -75,8 +62,18 @@ ButtonPolicy::SMInput FormChanges::input(FL_OBJECT * obj, long)
|
||||
|
||||
// Yes, this is needed.
|
||||
fl_redraw_form(form());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ButtonPolicy::SMInput FormChanges::input(FL_OBJECT * obj, long)
|
||||
{
|
||||
if (obj == dialog_->button_accept)
|
||||
controller().accept();
|
||||
else if (obj == dialog_->button_reject)
|
||||
controller().reject();
|
||||
else if (obj == dialog_->button_next)
|
||||
controller().find();
|
||||
update();
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user