<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 />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<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 27, 2014, 6:14 a.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>