GoogleCodeArchives / marave

Automatically exported from code.google.com/p/marave
GNU General Public License v2.0
0 stars 0 forks source link

Focus issue on preferences dialog #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run marave
2. Open preferences dialog
3. Set focus on any element of the preferences dialog
4. Close the preferences dialog
5. Move the mouse wheel (maybe some other movement with the keyboard would 
work too)
6. Open the preferences dialog again

What is the expected output? What do you see instead?
The preferences should be the same as they were before closing the dialong 
on step 4. Instead, some options change. Probably the focus isn't changed, 
so when you move the mouse wheel, it changes the value of the last selected 
element.

What version of the product are you using? On what operating system?
Marave r441 - Ubuntu Karmic Koala

Original issue reported on code.google.com by andresgattinoni on 1 Mar 2010 at 3:06

GoogleCodeExporter commented 9 years ago
For a change, I can't reproduce it. Qt 4.5, right? I may be forced to o a VM 
with that after 
all :-(

Original comment by roberto.alsina on 1 Mar 2010 at 3:15

GoogleCodeExporter commented 9 years ago
Yeap, Qt 4.5... that's what's on Kubuntu's repos.

This is the output, in case it helps

Using canvas editor
PATH: /usr/local/lib/python2.6/dist-packages/marave/plugins
Cannot open file '/usr/local/lib/python2.6/dist-
packages/marave/plugins/icons/configure.svg', because: No such file or directory
Cannot open file '/usr/local/lib/python2.6/dist-
packages/marave/plugins/icons/configure.svg', because: No such file or directory
Cannot open file '/usr/local/lib/python2.6/dist-
packages/marave/plugins/icons/configure.svg', because: No such file or directory
Cannot open file '/usr/local/lib/python2.6/dist-
packages/marave/plugins/icons/configure.svg', because: No such file or directory
Disabling spellchecker
Disabling spellchecker
Disabling spellchecker

Original comment by andresgattinoni on 1 Mar 2010 at 3:22

GoogleCodeExporter commented 9 years ago
I can't reproduce this one either using Qt4.5

Original comment by filipe.c...@gmail.com on 1 Mar 2010 at 11:01

GoogleCodeExporter commented 9 years ago
In that case, this may be also style-related.

Andrés, if you add -style windows does it make any difference?

Original comment by roberto.alsina on 1 Mar 2010 at 11:09

GoogleCodeExporter commented 9 years ago
I'm sorry, what do you mean by "add -style windows"?

Try following these steps:
1. Run marave
2. Open preferences dialog
3. Click on the themes dropdown
4. Click again to close the dropdown without selecting a new one (this is, 
leaving 
"Current" selected)
5. Close the preferences dialog clicking the X
6. Move your mouse wheel down

In my case, it changes marave's theme.

Original comment by andresgattinoni on 1 Mar 2010 at 1:12

GoogleCodeExporter commented 9 years ago
In the command line. Something like

marave-editor -style windows

I tried those steps and the themes dropdown doesn't even keep focus while I 
click on the X 
but on 4.5 this may be different.

Original comment by roberto.alsina on 1 Mar 2010 at 1:20

GoogleCodeExporter commented 9 years ago
With -style windows it doesn't happen.

I realized something: this happens when I place the mouse cursor in the place 
where 
the dropdown was. I mean, maybe you noticed that if you place your cursor over 
a 
dropdown and you move the mouse wheel, it changes the selected option. Well, 
when I 
close the prefs dialog and go to the same spot and move the mouse wheel, it 
changes 
the selected value of the dropdown.

Original comment by andresgattinoni on 1 Mar 2010 at 1:27

GoogleCodeExporter commented 9 years ago
If it only happens on the same spot that would indicate that the preferences 
widget is not 
hidden but only completely transparent. I'll have to install 4.5 to test it.

Original comment by roberto.alsina on 1 Mar 2010 at 1:34

GoogleCodeExporter commented 9 years ago
Now I can reproduce it by moving the mouse exactly in top of the location of 
the 
combobox.

Doing something like:

--- a/marave/main.py
+++ b/marave/main.py
@@ -968,6 +968,7 @@ class MainWidget (QtGui.QGraphicsView):
         # resizing the editor

         fadeout(self.prefsWidget, thendo=later)
+        self.prefsWidget.hide()
         self.editor.setFocus()
         self.visibleWidget=None

in hidewidgets() makes it go away, but doesn't look like a real solution.
I tried the hide in fadeout and show in fadein but that seems to break things.

Original comment by filipe.c...@gmail.com on 1 Mar 2010 at 1:43

GoogleCodeExporter commented 9 years ago
Maybe r443 helps?

Original comment by roberto.alsina on 1 Mar 2010 at 2:23

GoogleCodeExporter commented 9 years ago
Nope, still happening.

Original comment by andresgattinoni on 1 Mar 2010 at 2:30

GoogleCodeExporter commented 9 years ago
I tried the patch in fadein again and it seems to work. I think last time i 
tried i 
had some bad settings somewhere. Anyway here's my patch proposal:

--- a/marave/main.py
+++ b/marave/main.py
@@ -187,8 +187,16 @@ def fadein(thing, target=1., thendo=None):
         # FIXME maybe implement a timeline based opacity for QGraphicsItems
         if isinstance(thing, QtGui.QGraphicsItem):
             thing.setOpacity(target)
+            if(target):
+                thing.show()
+            else:
+                thing.hide()
         else:
             thing.proxy.setOpacity(target)
+            if(target):
+                thing.proxy.show()
+            else:
+                thing.proxy.hide()
         if thendo: thendo()

 def fadeout(thing, thendo=None):

It didn't seem to break anything on my side and it fixed the problem.

Original comment by filipe.c...@gmail.com on 2 Mar 2010 at 10:36

GoogleCodeExporter commented 9 years ago
I committed the patch as r445, andrés can you verify?

Original comment by roberto.alsina on 2 Mar 2010 at 10:54

GoogleCodeExporter commented 9 years ago
The focus issue is gone. But now when I change to the plugins tab, I only see 
an empty 
square, and the plugin button appears on the top left. Also the editor moves. 
See 
attached screenshot.

Original comment by andresgattinoni on 2 Mar 2010 at 12:21

Attachments:

GoogleCodeExporter commented 9 years ago
The empty square might have something to do with your configuration. Can you 
try with 
an empty configuration? About the button on the top left corner that's because 
in 
layoutButtons() there's a line like this:

            if not b.isVisible(): continue

If commented out the plugin button goes below the preferences button, but I 
don't 
know if this is what's intended. Also the plugin button at the moment doesn't 
do 
anything for me.

Original comment by filipe.c...@gmail.com on 2 Mar 2010 at 12:53

GoogleCodeExporter commented 9 years ago
I removed the plugin button in r446, it did nothing yet, so it was just makeing 
things harder.

Original comment by roberto.alsina on 2 Mar 2010 at 2:56

GoogleCodeExporter commented 9 years ago
And yes, you can move the editor by dragging the preferences widget (or the 
search 
/replace widget). I will create a new issue for that.

Original comment by roberto.alsina on 2 Mar 2010 at 2:59

GoogleCodeExporter commented 9 years ago
Added Issue #77 for the dragging.

Original comment by roberto.alsina on 2 Mar 2010 at 3:02

GoogleCodeExporter commented 9 years ago
What I meant wasn't dragging. When I changed to the plugins tab, the editor 
moved to 
the left, as if some margin was messed up when I clicked on the tab.

Original comment by andresgattinoni on 2 Mar 2010 at 3:08

GoogleCodeExporter commented 9 years ago
Well, that's weird. The editor shouldn't even notice if you click on the 
plugins tab.
You can reproduce that reliably?

Also, just curiosity: what style is that? I like the two-tone tabs.

Original comment by roberto.alsina on 2 Mar 2010 at 3:32

GoogleCodeExporter commented 9 years ago
Can you try changing changing the marave theme to gray and reproduce it? I 
noticed 
that for some reason with the curls theme the dragging is not as apparent as 
with gray 
(it takes some mouse moving around before you actually see that the drag 
happened).

Original comment by filipe.c...@gmail.com on 2 Mar 2010 at 3:39

GoogleCodeExporter commented 9 years ago
I've reproduced the error as follows:

1. Open prefs dialog
2. Attempt to drag the dialog.
3. Switch to the plugin's tab

It's like the drag occurs only after I change tab.

The style (if you mean the style set up on prefs) is "thin".

Original comment by andresgattinoni on 2 Mar 2010 at 3:41

GoogleCodeExporter commented 9 years ago
Yes, you're right. With "gray" theme it doesn't happen. The plugins not 
displaying 
happens in every theme, though.

Original comment by andresgattinoni on 2 Mar 2010 at 3:43

GoogleCodeExporter commented 9 years ago
I am splitting "the plugins are not displaying" to Issue 78

Original comment by roberto.alsina on 3 Mar 2010 at 11:59