Bug 93002

Summary: Colors indicating levels only appear after forcing repaint (e.g. by scrolling or minimizing + maximizing)
Product: kvoctrain Reporter: Marc Heyvaert <marc_heyvaert>
Component: generalAssignee: Peter Hedlund <peter>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: An example vocabulary file to simulate the bug

Description Marc Heyvaert 2004-11-09 21:34:34 UTC
Version:           CVS>0.8.1 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 
OS:                Linux

The level of your knowledge of a vocabulary is indicated by the use of colors. These are different, depending from what point of view you are looking. You obtain this information by selecting a cell in the Main view from any of the languages defined in the vocabulary. 

Expected behavior would be that after clicking (or selecting) a cell kvoctrain should check if the cell that was selected belongs to the same column as the previous cell. If this is the case, nothing should happen, but if the previous cell was in another column, a repainting should be forced, because colors indicating the level of learning can be different.

Marc
Comment 1 Peter Hedlund 2004-11-13 21:20:57 UTC
Would it be possible to attach a small vocabulary that demonstrates this issue and additional information on how to get undesired and desired behavior.

Changing to wishlist as requested by the reporter.
Comment 2 Marc Heyvaert 2004-11-15 10:12:09 UTC
Created attachment 8285 [details]
An example vocabulary file to simulate the bug
Comment 3 Marc Heyvaert 2004-11-15 10:13:01 UTC
I have set up a small webpage with some screenshots.

http://www.taiji.be/Prentjes/Bugpage.html

Attached the file that I used for the test.

In order to reproduce you have to load the file and position the cursor in different cells and watch how it affects the colors. (Or rather doesn't affect :)  ) Keeping the main window small so that you can scroll may help observing the behaviour, but you can force repaint also by minimizing+ maximizing.

Also, you have to set colors for the levels. You can do that in the General Options dialog on the same page where you customize the fonts used by KVoctrain.
Comment 4 Peter Hedlund 2004-11-16 21:36:47 UTC
CVS commit by hedlund: 

Correctly update color of original language when a translation is clicked.
BUG:93002


  M +2 -2      rowtable.cpp   1.34


--- kdeedu/kvoctrain/kvoctrain/rowtable.cpp  #1.33:1.34
@@ -1,5 +1,4 @@
 /***************************************************************************
 
-    $Id$
 
                  table view to kvoctrain document
@@ -441,4 +440,5 @@ void RowTable::contentsMousePressEvent( 
   int cc = columnAt(e->x());
   int cr = rowAt(e->y());
+  int co = currentColumn();
 
   QTable::contentsMousePressEvent(e);
@@ -447,5 +447,5 @@ void RowTable::contentsMousePressEvent( 
     // update color of original when column changes and more than 1 translation
     bool update_org = false;
-    if (cc != currentColumn() && numCols() > 2)
+    if (cc != co && numCols() > 2)
       update_org = true;