fixed two issues where actions would not be updated correctly

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent eedf2867a1
commit b401d49176
  1. 4
      src/document/UBDocumentController.cpp
  2. 5
      src/document/UBDocumentController.h
  3. 1
      src/gui/UBDocumentThumbnailWidget.cpp
  4. 4
      src/gui/UBThumbnailWidget.cpp

@ -1592,7 +1592,7 @@ void UBDocumentTreeView::dropEvent(QDropEvent *event)
QTreeView::dropEvent(event);
UBApplication::documentController->updateActions();
UBApplication::documentController->pageSelectionChanged();
}
void UBDocumentTreeView::paintEvent(QPaintEvent *event)
@ -2445,8 +2445,6 @@ void UBDocumentController::deleteSelectedItem()
}
pageSelectionChanged();
updateActions();
}
void UBDocumentController::deleteMultipleItems(QModelIndexList indexes, UBDocumentTreeModel* docModel)

@ -492,7 +492,6 @@ class UBDocumentController : public UBDocumentContainer
void copy();
void paste();
void focusChanged(QWidget *old, QWidget *current);
void updateActions();
void updateExportSubActions(const QModelIndex &selectedIndex);
void currentIndexMoved(const QModelIndex &newIndex, const QModelIndex &PreviousIndex);
@ -551,6 +550,8 @@ protected:
void TreeViewSelectionChanged(const QModelIndex &current, const QModelIndex &previous);
void TreeViewSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void pageSelectionChanged();
private slots:
void documentZoomSliderValueChanged (int value);
void itemSelectionChanged(LastSelectedElementType newSelection);
@ -558,7 +559,7 @@ protected:
void exportDocumentSet();
void thumbnailViewResized();
void pageSelectionChanged();
void updateActions();
void documentSceneChanged(UBDocumentProxy* proxy, int pSceneIndex);

@ -58,7 +58,6 @@ UBDocumentThumbnailWidget::~UBDocumentThumbnailWidget()
// NOOP
}
void UBDocumentThumbnailWidget::mouseMoveEvent(QMouseEvent *event)
{
if (!dragEnabled())

@ -315,7 +315,6 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event)
}
mSelectionSpan = index2 - index1;
selectItems(qMin(index1, index2), mSelectionSpan < 0 ? - mSelectionSpan + 1 : mSelectionSpan + 1);
return;
}
}
}
@ -334,8 +333,9 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event)
if (!mLastSelectedThumbnail && mGraphicItems.count() > 0)
mLastSelectedThumbnail = dynamic_cast<UBThumbnail*>(mGraphicItems.at(0));
mSelectionSpan = 0;
return;
}
UBApplication::documentController->pageSelectionChanged();
}

Loading…
Cancel
Save