--- master/src/Sigil/Dialogs/EditTOC_orig.cpp	2014-07-17 13:03:43.000000000 -0400
+++ master/src/Sigil/Dialogs/EditTOC.cpp	2014-07-17 13:07:13.000000000 -0400
@@ -131,7 +131,7 @@
 
 void EditTOC::MoveLeft()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -173,7 +173,7 @@
 
 void EditTOC::MoveRight()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -206,7 +206,7 @@
 
 void EditTOC::MoveUp()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -236,7 +236,7 @@
 
 void EditTOC::MoveDown()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -276,7 +276,7 @@
 
 void EditTOC::AddEntry(bool above)
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -305,13 +305,13 @@
     ui.TOCTree->selectionModel()->select(entry_item->index(), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
 }
 
-QModelIndex EditTOC::CheckSelection()
+QModelIndex EditTOC::CheckSelection(int row)
 {
     if (!ui.TOCTree->selectionModel()->hasSelection()) {
         return QModelIndex();
     }
 
-    QModelIndexList selected_indexes = ui.TOCTree->selectionModel()->selectedRows(0);
+    QModelIndexList selected_indexes = ui.TOCTree->selectionModel()->selectedRows(row);
 
     if (selected_indexes.count() != 1) {
         return QModelIndex();
@@ -322,7 +322,7 @@
 
 void EditTOC::DeleteEntry()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(0);
     if (!index.isValid()) {
         return;
     }
@@ -339,7 +339,7 @@
 
 void EditTOC::SelectTarget()
 {
-    QModelIndex index = CheckSelection();
+    QModelIndex index = CheckSelection(1);
     if (!index.isValid()) {
         return;
     }
--- master/src/Sigil/Dialogs/EditTOC_orig.h	2014-07-17 13:03:51.000000000 -0400
+++ master/src/Sigil/Dialogs/EditTOC.h	2014-07-17 19:49:47.000000000 -0400
@@ -72,7 +72,7 @@
 
 private:
     void AddEntry(bool above);
-    QModelIndex CheckSelection();
+    QModelIndex CheckSelection(int row);
 
     NCXModel::NCXEntry ConvertTableToEntries();
     NCXModel::NCXEntry ConvertItemToEntry(QStandardItem *item);
