[Marble-bugs] [Bug 232098] JJ: Please add fast adding messurment points by ctrl+click [MEDIUM]

Tommes tommesml at netcologne.de
Thu Sep 2 21:21:36 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=232098


Tommes <tommesml at netcologne.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tommesml at netcologne.de




--- Comment #1 from Tommes <tommesml netcologne de>  2010-09-02 21:21:36 ---
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;
            }

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Marble-bugs mailing list