mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
disallow the insertion of incomplete citation references, prevent crash (bug 1617)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8818 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fe87ad6b88
commit
c842720218
@ -1,3 +1,7 @@
|
|||||||
|
2004-06-21 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* QCitation.[Ch]: add validation (fix bug 1617).
|
||||||
|
|
||||||
2004-06-18 Lars Gullik Bjonnes <larsbj@gullik.net>
|
2004-06-18 Lars Gullik Bjonnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* lyx_gui.C (roman_font_name): go through QString when converting
|
* lyx_gui.C (roman_font_name): go through QString when converting
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "bufferparams.h"
|
#include "bufferparams.h"
|
||||||
|
|
||||||
|
#include "controllers/ButtonController.h"
|
||||||
#include "controllers/ControlCitation.h"
|
#include "controllers/ControlCitation.h"
|
||||||
|
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
@ -212,6 +213,8 @@ void QCitation::update_contents()
|
|||||||
// the bool prevents that this is also done after "apply"
|
// the bool prevents that this is also done after "apply"
|
||||||
if (open_find_)
|
if (open_find_)
|
||||||
dialog_->openFind();
|
dialog_->openFind();
|
||||||
|
|
||||||
|
bc().valid(isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -229,5 +232,12 @@ void QCitation::updateBrowser(QListBox * browser,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool QCitation::isValid()
|
||||||
|
{
|
||||||
|
return dialog_->selectedLB->count() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
@ -31,6 +31,8 @@ public:
|
|||||||
friend class QCitationDialog;
|
friend class QCitationDialog;
|
||||||
///
|
///
|
||||||
QCitation(Dialog &);
|
QCitation(Dialog &);
|
||||||
|
protected:
|
||||||
|
virtual bool isValid();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// Set the Params variable for the Controller.
|
/// Set the Params variable for the Controller.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-06-21 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* FormCitation.C: Don't allow incomplete input (fix bug 1617).
|
||||||
|
|
||||||
2004-06-04 Angus Leeming <leeming@lyx.org>
|
2004-06-04 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* combox.c (combox_handle): prevent crash when trying to draw
|
* combox.c (combox_handle): prevent crash when trying to draw
|
||||||
|
@ -434,6 +434,10 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
|||||||
fl_set_choice(dialog_->choice_style, choice);
|
fl_set_choice(dialog_->choice_style, choice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Invalid if no citation has been chosen
|
||||||
|
if (fl_get_browser_maxline(dialog_->browser_cite) < 1)
|
||||||
|
activate = ButtonPolicy::SMI_INVALID;
|
||||||
|
|
||||||
return activate;
|
return activate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user