mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
use default.ui position as fall back value
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15810 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3ae92a71ed
commit
6ced7141d2
@ -45,7 +45,10 @@ void Toolbars::initFlags(ToolbarBackend::Toolbar & tbb)
|
||||
ToolbarSection::ToolbarInfo & info = LyX::ref().session().toolbars().load(tbb.name);
|
||||
|
||||
unsigned int flags = static_cast<unsigned int>(tbb.flags);
|
||||
// remove position
|
||||
|
||||
// Remove default.ui positions. Only when a valid postion is stored
|
||||
// in the session file the default.ui value will be overwritten
|
||||
unsigned int save = flags;
|
||||
TurnOffFlag(TOP);
|
||||
TurnOffFlag(BOTTOM);
|
||||
TurnOffFlag(RIGHT);
|
||||
@ -62,7 +65,8 @@ void Toolbars::initFlags(ToolbarBackend::Toolbar & tbb)
|
||||
else if (info.location == ToolbarSection::ToolbarInfo::LEFT)
|
||||
TurnOnFlag(LEFT);
|
||||
else {
|
||||
TurnOnFlag(TOP);
|
||||
// use setting from default.ui
|
||||
flags = save;
|
||||
valid_location = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user