13
0

fix editor full-screen state when re-loading session

This commit is contained in:
Robin Gareus 2014-03-21 15:20:25 +01:00
parent 4f7d94ea67
commit 640bd36906

View File

@ -2415,7 +2415,11 @@ Editor::set_state (const XMLNode& node, int /*version*/)
if ((prop = node.property ("maximised"))) {
bool yn = string_is_affirmative (prop->value());
if (yn) {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleMaximalEditor"));
assert (act);
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
bool fs = tact && tact->get_active();
if (yn ^ fs) {
ActionManager::do_action ("Common", "ToggleMaximalEditor");
}
}