fix: right mouse on the history panel and favorite panel should not trigger the click event.

which means the word should not send to the mainwindow and translated.
This commit is contained in:
Xiao YiFang 2022-11-05 21:02:33 +08:00
parent c478065f53
commit 80fdb8cb82
2 changed files with 4 additions and 4 deletions

View file

@ -208,12 +208,12 @@ void FavoritesPaneWidget::onSelectionChanged( QItemSelection const & selection )
return; return;
itemSelectionChanged = true; itemSelectionChanged = true;
emitFavoritesItemRequested( selection.indexes().front() ); // emitFavoritesItemRequested( selection.indexes().front() );
} }
void FavoritesPaneWidget::onItemClicked( QModelIndex const & idx ) void FavoritesPaneWidget::onItemClicked( QModelIndex const & idx )
{ {
if ( !itemSelectionChanged && m_favoritesTree->selectionModel()->selectedIndexes().size() == 1 ) // if ( !itemSelectionChanged && m_favoritesTree->selectionModel()->selectedIndexes().size() == 1 )
{ {
emitFavoritesItemRequested( idx ); emitFavoritesItemRequested( idx );
} }

View file

@ -202,14 +202,14 @@ void HistoryPaneWidget::onSelectionChanged( QItemSelection const & selection )
return; return;
itemSelectionChanged = true; itemSelectionChanged = true;
emitHistoryItemRequested( selection.front().topLeft() ); // emitHistoryItemRequested( selection.front().topLeft() );
} }
void HistoryPaneWidget::onItemClicked( QModelIndex const & idx ) void HistoryPaneWidget::onItemClicked( QModelIndex const & idx )
{ {
// qDebug() << "clicked"; // qDebug() << "clicked";
if ( !itemSelectionChanged ) // if ( !itemSelectionChanged )
{ {
emitHistoryItemRequested( idx ); emitHistoryItemRequested( idx );
} }