[Marble-commits] KDE/kdeedu/marble/src/lib/routing
Dennis Nienhüser
earthwings at gentoo.org
Sat May 1 18:35:47 CEST 2010
SVN commit 1121545 by nienhueser:
Clicking on a selected instruction in the map deselects it.
M +5 -1 RoutingLayer.cpp
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingLayer.cpp #1121544:1121545
@@ -286,7 +286,11 @@
if ( region.region.contains( e->pos() ) ) {
if ( e->button() == Qt::LeftButton ) {
QModelIndex index = m_proxyModel->mapFromSource( region.index );
- m_selectionModel->select( index, QItemSelectionModel::ClearAndSelect );
+ QItemSelectionModel::SelectionFlag command = QItemSelectionModel::ClearAndSelect;
+ if ( m_selectionModel->isSelected( index ) ) {
+ command = QItemSelectionModel::Clear;
+ }
+ m_selectionModel->select( index, command );
m_insertStopOver = QPoint();
m_dragStopOver = false;
return true;
More information about the Marble-commits
mailing list