Author: ilor
Date: Tue Aug 12 11:35:14 2008
New Revision: 28480

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28480&view=rev
Log:
editor2 no-brushes-defined behaviour change

Modified:
    trunk/data/core/editor2-brushes.cfg
    trunk/src/editor2/editor_controller.cpp

Modified: trunk/data/core/editor2-brushes.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/editor2-brushes.cfg?rev=28480&r1=28479&r2=28480&view=diff
==============================================================================
--- trunk/data/core/editor2-brushes.cfg (original)
+++ trunk/data/core/editor2-brushes.cfg Tue Aug 12 11:35:14 2008
@@ -1,8 +1,17 @@
 #textdomain wesnoth-editor
 
 [brush]
+       name= _ "Single Hex"
+       [relative]
+               x=0
+               y=0
+       [/relative]
+[/brush]
+
+
+[brush]
        radius=1
-       name= _ "1 Hex"
+       name= _ "Radius 1 Hex"
        [relative]
                x=0
                y=0

Modified: trunk/src/editor2/editor_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_controller.cpp?rev=28480&r1=28479&r2=28480&view=diff
==============================================================================
--- trunk/src/editor2/editor_controller.cpp (original)
+++ trunk/src/editor2/editor_controller.cpp Tue Aug 12 11:35:14 2008
@@ -62,14 +62,14 @@
                foreground_terrain_, background_terrain_);
        //brush_bar_ = new brush_bar(gui(), *size_specs_);
        
-       brushes_.push_back(brush());
-       brushes_[0].add_relative_location(0, 0);
        const config::child_list& children = game_config.get_children("brush");
        foreach (const config* i, game_config.get_children("brush")) {
                brushes_.push_back(brush(*i));
        }
-       if (brushes_.size() == 1) {
-               WRN_ED << "No brushes defined!";
+       if (brushes_.size() == 0) {
+               ERR_ED << "No brushes defined!";
+               brushes_.push_back(brush());
+               brushes_[0].add_relative_location(0, 0);
        }
        brush_ = &brushes_[0];
        


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to