Author: ilor
Date: Tue Jul 15 18:30:09 2008
New Revision: 28045

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28045&view=rev
Log:
Make fullscreen switching work in editor2, among other stuff, by using 
preferences::display_manager

Modified:
    trunk/src/editor2/editor_controller.cpp
    trunk/src/editor2/editor_controller.hpp

Modified: trunk/src/editor2/editor_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_controller.cpp?rev=28045&r1=28044&r2=28045&view=diff
==============================================================================
--- trunk/src/editor2/editor_controller.cpp (original)
+++ trunk/src/editor2/editor_controller.cpp Tue Jul 15 18:30:09 2008
@@ -72,6 +72,7 @@
        theme_cfg = theme_cfg ? theme_cfg : &dummy;
        gui_ = new editor_display(video, map_, *theme_cfg, game_config_, 
config());
        gui_->set_grid(preferences::grid());
+       prefs_disp_manager_ = new preferences::display_manager(gui_);
 }
 
 editor_controller::~editor_controller()
@@ -83,6 +84,7 @@
        foreach (apr a, mouse_actions_) {
                delete a.second;
        }
+       delete prefs_disp_manager_;
 }
 
 void editor_controller::main_loop()
@@ -221,7 +223,6 @@
 void editor_controller::toggle_grid()
 {
        preferences::set_grid(!preferences::grid());
-       gui_->set_grid(preferences::grid());
        gui_->invalidate_all();
 }
 

Modified: trunk/src/editor2/editor_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_controller.hpp?rev=28045&r1=28044&r2=28045&view=diff
==============================================================================
--- trunk/src/editor2/editor_controller.hpp (original)
+++ trunk/src/editor2/editor_controller.hpp Tue Jul 15 18:30:09 2008
@@ -125,6 +125,8 @@
                /** The display object used and owned by the editor. Possibly 
recreated when a new map is created */
                editor_display* gui_;
                
+               preferences::display_manager* prefs_disp_manager_;
+               
                /**
                 * The undo stack. A double-ended queues due to the need to add 
items to one end,
                 * and remove from both when performing the undo or when 
trimming the size. This container owns


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

Reply via email to