← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug_156675_editor_initial_tool into lp:widelands

 

kaputtnik has proposed merging lp:~widelands-dev/widelands/bug_156675_editor_initial_tool into lp:widelands.

Commit message:
Use info tool as initial tool for the editor
Fixes bug 1566675

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1566675 in widelands: "Starting editor activates the height tool"
  https://bugs.launchpad.net/widelands/+bug/1566675

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug_156675_editor_initial_tool/+merge/291920

For the editor use the info tool as initial tool instead of the increase_height tool

Adjusted some spaces to have a nicer look.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug_156675_editor_initial_tool into lp:widelands.
=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc	2016-04-08 15:33:08 +0000
+++ src/editor/editorinteractive.cc	2016-04-14 16:49:19 +0000
@@ -686,7 +686,7 @@
 			redo_.set_enabled(false);
 
 			tools_.reset(new Tools());
-			select_tool(tools_->increase_height, EditorTool::First);
+			select_tool(tools_->info, EditorTool::First);
 			set_sel_radius(0);
 
 			set_need_save(false);

=== modified file 'src/editor/editorinteractive.h'
--- src/editor/editorinteractive.h	2016-04-06 09:23:04 +0000
+++ src/editor/editorinteractive.h	2016-04-14 16:49:19 +0000
@@ -52,7 +52,7 @@
 	struct Tools {
 		Tools()
 			:
-			current_pointer(&increase_height),
+			current_pointer(&info),
 			use_tool(EditorTool::First),
 			increase_height(decrease_height, set_height),
 			noise_height(set_height),
@@ -64,9 +64,9 @@
 		{}
 		EditorTool & current() const {return *current_pointer;}
 		using ToolVector = std::vector<EditorTool *>;
-		EditorTool          *          current_pointer;
-		EditorTool::ToolIndex         use_tool;
-		EditorInfoTool                info;
+		EditorTool          *        current_pointer;
+		EditorTool::ToolIndex        use_tool;
+		EditorInfoTool               info;
 		EditorSetHeightTool          set_height;
 		EditorDecreaseHeightTool     decrease_height;
 		EditorIncreaseHeightTool     increase_height;
@@ -74,14 +74,14 @@
 		EditorSetTerrainTool         set_terrain;
 		EditorDeleteImmovableTool    delete_immovable;
 		EditorPlaceImmovableTool     place_immovable;
-		EditorSetStartingPosTool    set_starting_pos;
+		EditorSetStartingPosTool     set_starting_pos;
 		EditorDeleteBobTool          delete_bob;
 		EditorPlaceBobTool           place_bob;
 		EditorDecreaseResourcesTool  decrease_resources;
 		EditorSetResourcesTool       set_resources;
 		EditorIncreaseResourcesTool  increase_resources;
-		EditorSetPortSpaceTool      set_port_space;
-		EditorUnsetPortSpaceTool    unset_port_space;
+		EditorSetPortSpaceTool       set_port_space;
+		EditorUnsetPortSpaceTool     unset_port_space;
 		EditorSetOriginTool          set_origin;
 		EditorMakeInfrastructureTool make_infrastructure;
 	};


References