When you have selected a node/way/anything and click on an empty space
on the map to unselect them, it takes a few seconds until it's
unselected and the application continues to react on user input. This is
a very frustrating thing when working with many objects and often
selecting something different.

I found out that access to the QSettings instance is relatively slow.
This was done for every object in all visible layers when deselecting
objects. Since preferences access does not depend on any loop variable,
I have moved the prefs access outside of that loop. Now there's no
noticeable delay left.

Since the QSettings class is a Qt class and it stores settings into the
registry on Windows (which is a thing not to be found on other
platforms), I assume that this bug is platform-dependent any may not be
visible on Linux/OSX. It is visible on Windows though and this patch
fixes it.

-- 
Yves Goergen "LonelyPixel" <[email protected]>
Visit my web laboratory at http://beta.unclassified.de
--- merkaartor\Interaction\EditInteraction.cpp.orig     Fri Jan 02 23:21:05 2009
+++ merkaartor\Interaction\EditInteraction.cpp  Sun Jan 04 20:25:13 2009
@@ -84,10 +84,11 @@
        {
                std::vector<MapFeature*> List;
                CoordBox DragBox(StartDrag,projection().inverse(ev->pos()));
+               bool getMouseSingleButton = M_PREFS->getMouseSingleButton();
                for (VisibleFeatureIterator it(document()); !it.isEnd(); ++it)
                        if (
-                               (M_PREFS->getMouseSingleButton() && 
ev->modifiers().testFlag(Qt::ShiftModifier) && 
ev->modifiers().testFlag(Qt::AltModifier)) ||
-                               (!M_PREFS->getMouseSingleButton() && 
ev->modifiers().testFlag(Qt::ShiftModifier))
+                               (getMouseSingleButton && 
ev->modifiers().testFlag(Qt::ShiftModifier) && 
ev->modifiers().testFlag(Qt::AltModifier)) ||
+                               (!getMouseSingleButton && 
ev->modifiers().testFlag(Qt::ShiftModifier))
                                )
                        {
                                if 
(!DragBox.intersects(it.get()->boundingBox()))
_______________________________________________
Merkaartor mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/merkaartor

Reply via email to