mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
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:
parent
c478065f53
commit
80fdb8cb82
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue