<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="https://git.reviewboard.kde.org/r/118885/">https://git.reviewboard.kde.org/r/118885/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 25th, 2014, 3:23 p.m. EEST, <b>Torsten Rahn</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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="https://git.reviewboard.kde.org/r/118885/diff/1/?file=283713#file283713line160" style="color: black; font-weight: bold; text-decoration: underline;">src/plugins/render/annotate/AnnotatePlugin.h</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; ">signals:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">152</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">void</span> <span class="nf">dealWithUncaughtEvents</span><span class="p">(</span> <span class="n">QMouseEvent</span> <span class="o">*</span><span class="n">mouseEvent</span> <span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Maybe this should get called "handle" or "process" instead of "dealwith" </pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Right, is sounds better.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 25th, 2014, 3:23 p.m. EEST, <b>Torsten Rahn</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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="https://git.reviewboard.kde.org/r/118885/diff/1/?file=283714#file283714line387" style="color: black; font-weight: bold; text-decoration: underline;">src/plugins/render/annotate/AnnotatePlugin.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 AnnotatePlugin::clearAnnotations()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">375</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">m_<span class="hl">select</span>edItem</span> <span class="o">=</span> <span class="mi">0</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">387</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">m_<span class="hl">mov</span>edItem</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I guess the m_movedItem is deleted elsewhere? Could you add a comment on this? :)</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Here m_movedItem is just pointing to an element from m_graphicsItem so we are not leaking memory here, because just three lines after this it is called qDeleteAll( m_graphicsItem ). However, I added a comment to be more clear.</pre>
<br />




<p>- Cruceru</p>


<br />
<p>On June 22nd, 2014, 11:09 p.m. EEST, Cruceru Calin-Cristian wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 Marble, Dennis Nienhüser and Torsten Rahn.</div>
<div>By Cruceru Calin-Cristian.</div>


<p style="color: grey;"><i>Updated June 22, 2014, 11:09 p.m.</i></p>









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


<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;">Added Merging Nodes option on polygons. 
I designed this new feature as a new "state" of the editing mode. This means that one cannot merge nodes and draw polygon holes at the same time since these are two different states. Initially I tried to implement a basic functionality by adding a new option within the RMB menu on polygons but it would have been pretty hard to decide which nodes to merge (the two selected ones? And what if I need to have more than two marked as selected?).
So, to enter this new 'Merging Nodes' state simply check the 'Merging Nodes' entry in the View menu (also make sure that there is only one option checked from the polygons editing tools - I let as a TODO not allow having more than one checked, but this is not as trivial as it may sound, since I also have to take into consideration the other editing mode tools like adding placemarks, etc). Then simply start clicking the nodes you want to merge in pairs of two. I also treated all special cases like trying to merge a node from the outer boundary with a node from the polygon's inner boundary or to merge two nodes from two different inner boundaries (this will result in a warning). The visual effect when merging nodes is basic so far: I only draw differently the first selected node (I am waiting suggestions on how would you like this merging to "look", visually speaking). 
One important thing to mention is that I did not restrict the merging on neighbor nodes because I thought that one may also find useful how it works on nodes which are not neighbor.


This patch also contains a new design for handling events in Annotate Plugin class which, in my opinion, is more intuitive and easily extensible (I even experienced this while implementing 'Merging Nodes'). To describe this new approach I have to say first that I was inspired by Adam's changes in MarbleInputHandler. Since AnnotatePlugin::eventFilter would have become larger and larger as new features are added, something for sure should have been modified. Tell me if you think the split technique I approached is a good solution to this.
</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;">I tested most of the possibilities: simple polygon with only outer boundary, polygon with an inner boundary, polygon with multiple inner boundaries, polygon with selected nodes on the outer boundary, polygon with selected nodes on each inner boundary, etc. In all my tests it worked as expected. However, the chances of crash increase proportionally with the number of features added to this edit mode, so some more testing is always good.</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>src/plugins/render/annotate/AnnotatePlugin.h <span style="color: grey">(0b426a7)</span></li>

 <li>src/plugins/render/annotate/AnnotatePlugin.cpp <span style="color: grey">(d6e5e8a)</span></li>

 <li>src/plugins/render/annotate/AreaAnnotation.h <span style="color: grey">(d349a3c)</span></li>

 <li>src/plugins/render/annotate/AreaAnnotation.cpp <span style="color: grey">(3952a91)</span></li>

 <li>src/plugins/render/annotate/GroundOverlayFrame.h <span style="color: grey">(5037430)</span></li>

 <li>src/plugins/render/annotate/PlacemarkTextAnnotation.h <span style="color: grey">(cdc9a0e)</span></li>

</ul>

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







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








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