Skip to content

Commit

Permalink
associations fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Nov 29, 2016
1 parent cee55df commit 1164465
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions far/changelog
@@ -1,3 +1,7 @@
drkns 29.11.2016 21:50:31 +0200 - build 4863

1. Падение при вызове меню ассоциаций, если ассоциации отсутствовали.

zg 29.11.2016 19:09:02 +0200 - build 4862

1. продолжение 4808.1.
Expand Down
4 changes: 2 additions & 2 deletions far/filetype.cpp
Expand Up @@ -315,14 +315,14 @@ static auto FillFileTypesMenu(VMenu2* TypesMenu, int MenuPos)
}
}

const auto DescriptionsWidth = std::max_element(ALL_CONST_RANGE(Data), [](const auto& a, const auto &b) { return a.Description.size() < b.Description.size(); })->Description.size();
const auto MaxElement = std::max_element(ALL_CONST_RANGE(Data), [](const auto& a, const auto &b) { return a.Description.size() < b.Description.size(); });

TypesMenu->clear();

for (auto i: Data)
{
const auto AddLen = i.Description.size() - HiStrlen(i.Description);
MenuItemEx TypesMenuItem(concat(fit_to_left(i.Description, DescriptionsWidth + AddLen), L' ', BoxSymbols[BS_V1], L' ', i.Mask));
MenuItemEx TypesMenuItem(concat(fit_to_left(i.Description, MaxElement->Description.size() + AddLen), L' ', BoxSymbols[BS_V1], L' ', i.Mask));
TypesMenuItem.UserData = i.Id;
TypesMenu->AddItem(TypesMenuItem);
}
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4862)m4_dnl
m4_define(BUILD,4863)m4_dnl

0 comments on commit 1164465

Please sign in to comment.