Merge lp://staging/~widelands-dev/widelands/editor-resize-map into lp://staging/widelands

Proposed by Benedikt Straub
Status: Merged
Merged at revision: 9072
Proposed branch: lp://staging/~widelands-dev/widelands/editor-resize-map
Merge into: lp://staging/widelands
Diff against target: 1162 lines (+649/-119)
16 files modified
src/editor/CMakeLists.txt (+4/-0)
src/editor/editorinteractive.cc (+2/-2)
src/editor/editorinteractive.h (+6/-2)
src/editor/tools/action_args.h (+12/-0)
src/editor/tools/history.cc (+1/-0)
src/editor/tools/resize_tool.cc (+99/-0)
src/editor/tools/resize_tool.h (+76/-0)
src/editor/ui_menus/main_menu_new_map.cc (+23/-37)
src/editor/ui_menus/main_menu_new_map.h (+3/-3)
src/editor/ui_menus/main_menu_random_map.cc (+40/-47)
src/editor/ui_menus/main_menu_random_map.h (+3/-5)
src/editor/ui_menus/tool_menu.cc (+23/-10)
src/editor/ui_menus/tool_resize_options_menu.cc (+108/-0)
src/editor/ui_menus/tool_resize_options_menu.h (+48/-0)
src/logic/map.cc (+169/-5)
src/logic/map.h (+32/-8)
To merge this branch: bzr merge lp://staging/~widelands-dev/widelands/editor-resize-map
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+365638@code.staging.launchpad.net

Commit message

Add an editor tool to change the map size

Description of the change

This is for b21.

Usage:
· Tool Menu → Resize
· Set the new map size
· Click on the map field where to split the map
New rows/columns will be inserted at the clicked spot. The field itself will then be located on the southeastern corner of the inserted rectangle of new fields. When making the map smaller, rows/columns south and east of the clicked field will be deleted.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4685. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/516924316.
Appveyor build 4471. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_editor_resize_map-4471.

Revision history for this message
GunChleoc (gunchleoc) wrote :

First round of code review done. Not tested yet.

Revision history for this message
Benedikt Straub (nordfriese) wrote :

Thanks for the review, implemented your suggestions

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4695. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/517211510.
Appveyor build 4481. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_editor_resize_map-4481.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Changes LGTM :)

Not tested yet.

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

I have given this a very quick spin.

I don't think that it is obvious to the user that they need to click on the map after selecting the values. Best add a Multilinetextarea with a hint.

I think it would also be good to have dropdown menus for the map size rather than spin boxes - selecting them will be much faster that way. You could put this into a separate class and use it everywhere in the editor where map sized are being set.

Revision history for this message
Benedikt Straub (nordfriese) wrote :

OK, added the hint and replaced spinners with dropdowns in the Resize Tool options and the New Map and Random Map menus. The large code blocks for setting the initial values are now shorter and more intuitive, I don´t think we would gain much by making a new class for it.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4708. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/518246751.
Appveyor build 4494. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_editor_resize_map-4494.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Changes look good. I have done some testing with a few random maps - no issues :)

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Transient failure on Travis

@bunnybot merge force

Revision history for this message
bunnybot (widelandsofficial) wrote :

Error merging this proposal:

Output:
stdout:

stderr:
+N data/images/wui/editor/editor_menu_tool_resize.png
+N data/images/wui/editor/fsel_editor_resize.png
+N src/editor/tools/resize_tool.cc
+N src/editor/tools/resize_tool.h
+N src/editor/ui_menus/tool_resize_options_menu.cc
+N src/editor/ui_menus/tool_resize_options_menu.h
 M src/editor/CMakeLists.txt
 M src/editor/editorinteractive.cc
 M src/editor/editorinteractive.h
 M src/editor/tools/action_args.h
 M src/editor/tools/history.cc
 M src/editor/ui_menus/main_menu_new_map.cc
 M src/editor/ui_menus/main_menu_new_map.h
 M src/editor/ui_menus/main_menu_random_map.cc
 M src/editor/ui_menus/main_menu_random_map.h
 M src/editor/ui_menus/tool_menu.cc
 M src/logic/map.cc
 M src/logic/map.h
Text conflict in src/editor/ui_menus/tool_menu.cc
1 conflicts encountered.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4766. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/523536087.
Appveyor build 4550. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_editor_resize_map-4550.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Transient failure on Travis

@bunnybot merge

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge force

Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 4766. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/523536087.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge force

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: