the focus has never gotten here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33856
a592a061-630c-0410-9148-
cb99ea01b6c8
void GuiSelectionManager::upPB_clicked()
{
void GuiSelectionManager::upPB_clicked()
{
- QModelIndex idx = selectedLV->currentIndex();
+ QModelIndexList selIdx =
+ selectedLV->selectionModel()->selectedIndexes();
+ if (selIdx.isEmpty())
+ return;
+ QModelIndex idx = selIdx.first();
int const pos = idx.row();
if (pos <= 0)
int const pos = idx.row();
if (pos <= 0)
void GuiSelectionManager::downPB_clicked()
{
void GuiSelectionManager::downPB_clicked()
{
- QModelIndex idx = selectedLV->currentIndex();
+ QModelIndexList selIdx =
+ selectedLV->selectionModel()->selectedIndexes();
+ if (selIdx.isEmpty())
+ return;
+ QModelIndex idx = selIdx.first();
int const pos = idx.row();
if (pos >= selectedModel->rowCount() - 1)
int const pos = idx.row();
if (pos >= selectedModel->rowCount() - 1)