mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 23:59:04 +00:00
Remove the option to disable the mdi feature of the editor.
This commit is contained in:
parent
6387984f69
commit
3a7039ea21
@ -214,27 +214,6 @@
|
||||
[/label]
|
||||
[/column]
|
||||
[/row]
|
||||
[row]
|
||||
grow_factor = 0
|
||||
[column]
|
||||
horizontal_alignment = "left"
|
||||
[grid]
|
||||
[row]
|
||||
grow_factor = 0
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "left"
|
||||
[toggle_button]
|
||||
id = "use_mdi"
|
||||
definition = "default"
|
||||
label = _ "Allow multiple maps to be open simultaneously"
|
||||
[/toggle_button]
|
||||
[/column]
|
||||
[/row]
|
||||
[/grid]
|
||||
[/column]
|
||||
[/row]
|
||||
[row]
|
||||
grow_factor = 0
|
||||
[column]
|
||||
|
@ -29,14 +29,6 @@ namespace editor {
|
||||
preferences::set("editor_auto_update_transitions", lexical_cast<std::string>(value));
|
||||
}
|
||||
|
||||
bool use_mdi() {
|
||||
return preferences::get("editor_use_mdi", true);
|
||||
}
|
||||
|
||||
void set_use_mdi(bool value) {
|
||||
preferences::set("editor_use_mdi", value);
|
||||
}
|
||||
|
||||
std::string default_dir() {
|
||||
return preferences::get("editor_default_dir");
|
||||
}
|
||||
|
@ -31,9 +31,6 @@ namespace editor {
|
||||
int auto_update_transitions();
|
||||
void set_auto_update_transitions(int value);
|
||||
|
||||
bool use_mdi();
|
||||
void set_use_mdi(bool value);
|
||||
|
||||
std::string default_dir();
|
||||
|
||||
bool draw_terrain_codes();
|
||||
|
@ -169,33 +169,23 @@ void context_manager::set_default_dir(const std::string& str)
|
||||
|
||||
void context_manager::load_map_dialog(bool force_same_context /* = false */)
|
||||
{
|
||||
if (!preferences::editor::use_mdi() && !confirm_discard()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string fn = directory_name(get_map_context().get_filename());
|
||||
if (fn.empty()) {
|
||||
fn = default_dir_;
|
||||
}
|
||||
int res = dialogs::show_file_chooser_dialog(gui_, fn, _("Choose a Map to Open"));
|
||||
if (res == 0) {
|
||||
load_map(fn, force_same_context
|
||||
? false
|
||||
: preferences::editor::use_mdi());
|
||||
load_map(fn, !force_same_context);
|
||||
}
|
||||
}
|
||||
|
||||
void context_manager::new_map_dialog()
|
||||
{
|
||||
if (!preferences::editor::use_mdi() && !confirm_discard()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int w = get_map().w();
|
||||
int h = get_map().h();
|
||||
if(gui2::teditor_new_map::execute(w, h, gui_.video())) {
|
||||
const t_translation::t_terrain fill = get_selected_bg_terrain();
|
||||
new_map(w, h, fill, preferences::editor::use_mdi());
|
||||
new_map(w, h, fill, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,10 +99,6 @@ teditor_settings::teditor_settings(editor::editor_display* display
|
||||
, display_(display)
|
||||
, can_update_display_(false)
|
||||
{
|
||||
register_bool("use_mdi"
|
||||
, true
|
||||
, &preferences::editor::use_mdi
|
||||
, &preferences::editor::set_use_mdi);
|
||||
}
|
||||
|
||||
void teditor_settings::do_next_tod(twindow& window)
|
||||
|
Loading…
x
Reference in New Issue
Block a user