Don't be so picky here.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33857 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-03-24 15:08:39 +00:00
parent 0b5ec3d92e
commit ffd3b5a6a3

View File

@ -225,8 +225,10 @@ void GuiSelectionManager::selectedChanged(const QModelIndex & idx, const QModelI
bool GuiSelectionManager::insertRowToSelected(int i,
QMap<int, QVariant> const & itemData)
{
if (i <= -1 || i > selectedModel->rowCount())
return false;
if (i <= -1)
i = 0;
if (i > selectedModel->rowCount())
i = selectedModel->rowCount();
if (!selectedModel->insertRow(i))
return false;
return selectedModel->setItemData(selectedModel->index(i), itemData);