View Issue Details

IDProjectCategoryView StatusLast Update
0002433FreeCADBugpublic2016-03-11 12:35
Reporterfer06137 Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOS7OS Version64 Bit
Product Version0.15 
Fixed in Version0.16 
Summary0002433: Window weirdness after changing constraint value in sketcher
DescriptionWhen you double click on a constraint in the sketcher window and edit its value the display does some weird snapping and windowing after the change entered. Changing the constraint value from the constraint list in the sidebar does not have the same problem.
Steps To ReproduceCreate a sketch with sketcher.
Draw anything on it and create some dimensional constraint.
Double click on the constraint value in the sketcher window (not in the side bar)
Change the constraint value and enter.
The mouse will now be locked to the background and rotate the sketch.
ESC will release. Next the mouse will do a select on the sketch. ESC will release.
Additional InformationI had a quick look into the code and suspect it has something to do with the auto centering on double click that was introduced in V14.
TagsNo tags attached.
FreeCAD Information

Activities

bejant

2016-02-23 18:34

reporter   ~0006847

Hi fer06137, would you post your Help > About FreeCAD > Copy To Clipboard info? I can't reproduce this on Ubuntu, and if it had occurred when I was using FreeCAD it would be something that I'd remember because it would be so annoying. My Help > About FreeCAD info:

OS: Ubuntu 14.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6456 (Git)
Build type: None
Branch: master
Hash: 9e551e0fdb4321de57471d18a17449e4df0015a6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

fer06137

2016-02-24 11:12

reporter   ~0006849

Hi bejant

Sure is very annoying, have learned to use the side menu to edit a constraint, but from time to time forget. Sounds like this problem is limited to Windows.

OS: Windows 8
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a

bejant

2016-02-28 04:18

reporter   ~0006851

Would you try using newer version of FreeCAD and lest us know if you still have the problem? There are 0.16 versions that are already compiled, you will want this one:
https://github.com/FreeCAD/FreeCAD/releases/download/0.16_pre/FreeCAD_0.16.6476_x64_dev_win.7z

It's the third one down on this page:
https://github.com/FreeCAD/FreeCAD/releases
(the first two are for Mac)

To use, unpack the .7z archive to an empty folder on your system (avoid using a directory with special characters, such as the German umlaut, in the path) then start by double clicking freecad in the bin sub-folder of the extracted folder. You will still have 0.15.4671 installed too, unless you uninstall it.

fer06137

2016-02-28 05:41

reporter   ~0006852

Hi bejant

Downloaded the latest and still have the problem.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6476 (Git)
Build type: Release
Branch: master
Hash: 28b6c825553dc462a96a3d138374b8b55b6e4cf6
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

After your previous note I installed a VM with Linux Mint and installed latest Freecad and it did not have the same problem. It is therefore a bug that is limited to Windows. I also saw the problem with Windows 10. It would be great if someone with a Windows system could replicate so that we could be sure it is problem and not just something on mine.

jmaustpc

2016-03-01 04:06

manager   ~0006865

Hi fer06137
thank you for taking the time to create a ticket, however please always discuss something in the help forum first, no matter how sure you are that you have found a bug, so that we can keep the number of tickets down and their quality up. Then always post a link to the topic in the bug ticket.

As you said, it would be good to know if anyone else sees this, if you had posted this to the forum we would most likely know by now as many more would have seen this.

I very much doubt that others are seeing this because you would think someone would have posted about it by now, however it could be that you are doing some different combination of settings or some such thing.

As with all graphic on Windows issues, my first question would be have you been to your GPU manufactures web site and downloaded their latest GPU driver to see if the problem is resolve? In your case I don't think that is the problem but .....

My next question is what Navigation style are you using? If you are not using "CAD style" already then change to it and see if the bug is still there. If it is related to navigation modes then this ticket would be better closed and an appropriate new one created, another reason why discussing on the forum first could have helped.

fer06137

2016-03-01 12:04

reporter   ~0006868

Hi jmaustpc

I am using "Inventor style" and all my systems have the latest graphic drivers.

The problem however is not there when you change to "CAD Style" and it looks like the fault is limited to Windows using "Inventor style". Reading your note above, do I log this bug on the forum and then relist it once the forum has come to the same conclusion?

Thanks however for a great and very useful app! Keep up the good work.

jmaustpc

2016-03-01 14:58

manager   ~0006869

http://forum.freecadweb.org/viewtopic.php?f=3&t=14487&p=116053#p116053

seems to be a bug associated with Inventor style navigation on Windows for which a new ticket can be created once defined in the above Help Forum topic.

wmayer

2016-03-11 12:26

administrator   ~0006903

As already said on the forum there is a problem that for the double-click on the second press event a dialog is about to being shown which then consumes the release event.

This way the Inventor style gets into an inconsistent state. The same happens for Blender, CAD, Touchpad and OpenCascade while Gesture and Maya is not affected.

I have tried three different methods to fix this issue:

1. At the code that shows the dialog an artificial release event could be sent to the viewer to make sure that the styles won't become inconsistent. It works but the downside of this is that you actually have to do the same in all other (future) cases where a release event is consumed by something else than the viewer.

if (edit->editDatumDialog && pressed) {
    Qt::MouseButton button = Qt::NoButton;
    switch (Button) {
    case SoMouseButtonEvent::BUTTON1:
        button = Qt::LeftButton;
        break;
    case SoMouseButtonEvent::BUTTON2:
        button = Qt::RightButton;
        break;
    case SoMouseButtonEvent::BUTTON3:
        button = Qt::MiddleButton;
        break;
    }

    QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonRelease,
        QPoint(cursorPos[0], cursorPos[1]),
        button, Qt::NoButton, Qt::NoModifier);
    QApplication::postEvent(const_cast<Gui::View3DInventorViewer*>(viewer), event);
}

2. Instead of sending an event the viewer can grab any mouse button events until the mouse is button is released. But this has the same downside as 1.)

if (edit->editDatumDialog && pressed) {
    const_cast<Gui::View3DInventorViewer*>(viewer)->grabMouse();
}

bool View3DInventorViewer::processSoEvent(const SoEvent* ev)
{
    if (QWidget::mouseGrabber() == this && ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) {
        this->releaseMouse();
    }
...

3. As said above Gesture and Maya don't suffer from this problem. There a little trick is used. The second mouse press event is kept back until the mouse is released again and then send down the scene graph.
I have applied this idea to all other styles too now. The advantage of this solution is that no external code must be changed.

Related Changesets

FreeCAD: master 32760491

2016-03-11 13:33:23

wmayer

Details Diff
+ fixes 0002433: Window weirdness after changing constraint value in sketcher Affected Issues
0002433
mod - src/Gui/BlenderNavigationStyle.cpp Diff File
mod - src/Gui/CADNavigationStyle.cpp Diff File
mod - src/Gui/InventorNavigationStyle.cpp Diff File
mod - src/Gui/NavigationStyle.h Diff File
mod - src/Gui/OpenCascadeNavigationStyle.cpp Diff File
mod - src/Gui/TouchpadNavigationStyle.cpp Diff File

Issue History

Date Modified Username Field Change
2016-02-03 03:32 fer06137 New Issue
2016-02-23 18:34 bejant Note Added: 0006847
2016-02-24 11:12 fer06137 Note Added: 0006849
2016-02-28 04:18 bejant Note Added: 0006851
2016-02-28 05:41 fer06137 Note Added: 0006852
2016-03-01 04:06 jmaustpc Note Added: 0006865
2016-03-01 12:04 fer06137 Note Added: 0006868
2016-03-01 14:58 jmaustpc Note Added: 0006869
2016-03-01 14:58 jmaustpc Status new => closed
2016-03-01 14:58 jmaustpc Assigned To => jmaustpc
2016-03-01 14:58 jmaustpc Resolution open => no change required
2016-03-01 17:39 wmayer Status closed => confirmed
2016-03-01 17:39 wmayer Resolution no change required => open
2016-03-11 12:26 wmayer Note Added: 0006903
2016-03-11 12:34 wmayer Changeset attached => FreeCAD Master master 32760491
2016-03-11 12:34 wmayer Assigned To jmaustpc => wmayer
2016-03-11 12:34 wmayer Status confirmed => closed
2016-03-11 12:34 wmayer Resolution open => fixed
2016-03-11 12:35 wmayer Fixed in Version => 0.16