Version: (using KDE 4.3.4) Installed from: Debian testing/unstable Packages please add a possibility to add measurement points by just one click while holding down a modifier key (maybe Ctrl).
I am new to marble development. I played around with the QT-Version and would like to propose the following change. However, I am not sure if this change could break something around the rubber-band code, which uses the control-key as well. Therefore I compare the coordinates between button-press and button-release. The addMeasurePoint() triggers only if the coordinates are equal. I am not sure how to generate a patch. It would be great if anyone could point me to some guidelines. Thanks, Thomas File: marble/src/lib/MarbleWidgetInputHandler.cpp // Regarding mouse button releases: if ( e->type() == QEvent::MouseButtonRelease && event->button() == Qt::LeftButton ) { if ( ( event->modifiers() & Qt::ControlModifier ) && ( event->globalPos() == d->m_selectionOrigin ) ) { d->m_addMeasurePointAction->setData( QPoint( event->x(), event->y() ) ); addMeasurePoint(); } else { //emit current coordinates to be be interpreted //as requested emit mouseClickScreenPosition( d->m_leftpressedx, d->m_leftpressedy ); } MarbleWidgetInputHandler::d->m_widget->setViewContext( Still ); if ( MarbleWidgetInputHandler::d->m_widget->mapQuality( Still ) != MarbleWidgetInputHandler::d->m_widget->mapQuality( Animation ) ) { MarbleWidgetInputHandler::d->m_widget->updateChangedMap(); } d->m_leftpressed = false; }
Created attachment 51276 [details] Proposed patch
Thomas: thanks! Looks nice. I suggest that you also post patch suggestions to marble-devel and/or to reviewboard to raise awareness (I just accidently stumbled over this when looking through the bugs). :-)
Created attachment 53830 [details] [Patch] Proposed patch fast adding measure-points Hello, I would like to propose a second patch for this junior job. It still uses the CTRL modifier key. However, "measure mode" has to be switched on via a new added menu toggle option within the right-mouse-button menu. This should avoid the conflict with the rubber-band-selection using the CTRL modifier key as well. When in "measure mode" the mouse-pointer changes to the "arrow-up"-pointer when CTRL is pressed to indicate the different behaviour. Please see attachment. Best wishes, Thomas
*** Bug 280121 has been marked as a duplicate of this bug. ***
Created attachment 62999 [details] updated patch I've taken the Thomas Lenarz's patch and updated it, because it didn't apply to the latest Marble sources. Works as expected here. The feature works even better that in Google Earth, because in Google Earth you can't scroll the map using left mouse button while you are drawing the path (due to left mouse button being used for both dragging and path drawing).
Please follow up in https://phabricator.kde.org/T4260