Skip to content

Commit

Permalink
Fix grid number format in status bar, it should be 0.125, 0.25, 0.5, …
Browse files Browse the repository at this point in the history
…1, 2, 4, 8, etc., no trailing post-comma zeros like 64.0000.
  • Loading branch information
codereader committed Dec 29, 2017
1 parent 149fa1d commit f3282b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radiant/ui/grid/GridManager.cpp
Expand Up @@ -16,6 +16,7 @@
#include "i18n.h"
#include "GridItem.h"
#include <functional>
#include <fmt/format.h>

#include "modulesystem/StaticModule.h"

Expand Down Expand Up @@ -239,7 +240,7 @@ void GridManager::gridChanged()
GlobalEventManager().setToggled(toggleName, _activeGridSize == gridItem.getGridSize());
}

GlobalUIManager().getStatusBarManager().setText("GridStatus", string::to_string(getGridSize()));
GlobalUIManager().getStatusBarManager().setText("GridStatus", fmt::format("{0:g}", getGridSize()));

gridChangeNotify();

Expand Down

0 comments on commit f3282b6

Please sign in to comment.