<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/110333/">http://git.reviewboard.kde.org/r/110333/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Parts of it are getting a bit convoluted, and we'll need to think about cleaning up a bit, but apart from that, ship it.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/110333/diff/1/?file=142382#file142382line348" style="color: black; font-weight: bold; text-decoration: underline;">krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void KisLayerBox::setCanvas(KoCanvasBase *canvas)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">348</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">Kis<span class="hl">DummiesFacadeBase</span></span> <span class="o">*</span><span class="n">krita<span class="hl">DummiesFacade</span></span> <span class="o">=</span> <span class="k">dynamic_cast</span><span class="o"><</span><span class="n">Kis<span class="hl">DummiesFacadeBase</span></span><span class="o">*></span><span class="p">(</span><span class="n">m_canvas</span><span class="o">-></span><span class="n">view</span><span class="p">()</span><span class="o">-></span><span class="n">document</span><span class="p">()</span><span class="o">-></span><span class="n">shapeController</span><span class="p">());</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">348</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">Kis<span class="hl">ShapeController</span></span> <span class="o">*</span><span class="n">krita<span class="hl">ShapeController</span></span> <span class="o">=</span> <span class="k">dynamic_cast</span><span class="o"><</span><span class="n">Kis<span class="hl">ShapeController</span></span><span class="o">*></span><span class="p">(</span><span class="n">m_canvas</span><span class="o">-></span><span class="n">view</span><span class="p">()</span><span class="o">-></span><span class="n">document</span><span class="p">()</span><span class="o">-></span><span class="n">shapeController</span><span class="p">());</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Note for the future: a dynamic cast and a static cast here -- we really need to think about a better design for this!</pre>
</div>
<br />



<p>- Boudewijn</p>


<br />
<p>On May 6th, 2013, 4:30 p.m. UTC, Dmitry Kazakov wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Calligra.</div>
<div>By Dmitry Kazakov.</div>


<p style="color: grey;"><i>Updated May 6, 2013, 4:30 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It happens so, that when the cross-process Drag is dropped to the KoDocumentSectionView, some spurious MouseMove event come and start another Drag (effectively, cancelling the current one). I guess, that happens due to some weird order of setting up of event filters (in QWidget and in QDragManager), so that the QWidget's filter gets the MouseMove events before the QDragManager's one. Actually, QWidget should not get any MouseMove events during Dragiing. It should get DragMoveEvents instead.

This patch workarounds this problem (i guess, Qt is the cause) and drops all the MouseMove events when they come while the Dragging operation. I activate the workaround on X11 only, because, most probably, Qt's D&D works differently on Windows.

This patch fixed bug:
https://bugs.kde.org/show_bug.cgi?id=319334</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested vastly on the Layer Box in Krita.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp <span style="color: grey">(12689ed)</span></li>

 <li>krita/ui/kis_mimedata.h <span style="color: grey">(7055043)</span></li>

 <li>krita/ui/kis_mimedata.cpp <span style="color: grey">(64af6b3)</span></li>

 <li>krita/ui/kis_node_model.h <span style="color: grey">(c1854a0)</span></li>

 <li>krita/ui/kis_node_model.cpp <span style="color: grey">(3a21127)</span></li>

 <li>krita/ui/kis_view2.cpp <span style="color: grey">(7d4c6da)</span></li>

 <li>krita/ui/tests/kis_model_index_converter_test.cpp <span style="color: grey">(80a3117)</span></li>

 <li>krita/ui/tests/kis_node_model_test.cpp <span style="color: grey">(1c9bb21)</span></li>

 <li>libs/main/KoDocumentSectionView.h <span style="color: grey">(7a535cb)</span></li>

 <li>libs/main/KoDocumentSectionView.cpp <span style="color: grey">(768c671)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/110333/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>