<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/104075/">http://git.reviewboard.kde.org/r/104075/</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;">Ship It!</pre>
 <br />







<p>- Boudewijn</p>


<br />
<p>On February 25th, 2012, 11:13 a.m., Dmitry Kazakov wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.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 Feb. 25, 2012, 11:13 a.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;">Way to reproduce:
1) Open new document
2) Disable a layer with a mouse
3) Enable a layer with a tablet
You will not be able to paint with the tablet.
    
What actually happened was that a new CanvasData was created, but the previous tool could not be activated in the new data, because of an explicit check in switchTool. So that we ended up in a state with no tool at all.
    
This patch brings a bit more consistency there. Now you can always switch the tool in the KoToolManager, even when active layer is disabled, but the KoToolProxy will get information about the new tool only when the layer gets enabled back. This is what the code in currentLayerChanged() and toolCanBeUsed() has been doing before. There was inconsistency in postSwitchTool(), because it didn't check for the availability of the active layer, now it does.
</pre>
  </td>
 </tr>
</table>




<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=277047">277047</a>


</div>


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

 <li>libs/flake/KoToolManager.cpp <span style="color: grey">(855d3ea)</span></li>

 <li>libs/flake/KoToolManager_p.h <span style="color: grey">(ca7e0d2)</span></li>

</ul>

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




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








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