Gui: fix some MSVC truncation warnings

See forum: https://forum.freecad.org/viewtopic.php?t=81051
This commit is contained in:
wmayer
2023-09-10 16:19:49 +02:00
committed by wwmayer
parent a51bacfd9f
commit 561be3f55c
3 changed files with 10 additions and 4 deletions

View File

@@ -1734,7 +1734,7 @@ void MainWindow::renderDevBuildWarning(
lineHeight = painter.fontMetrics().lineSpacing();
boxWidth = maxSize.width();
}
constexpr float lineExpansionFactor(2.3);
constexpr float lineExpansionFactor(2.3F);
int boxHeight = static_cast<int>(lineHeight*lineExpansionFactor);
// Draw the background rectangle and the text

View File

@@ -531,10 +531,16 @@ public:
*/
//@{
/// Return the current selection stack size
int selStackBackSize() const {return _SelStackBack.size();}
std::size_t selStackBackSize() const
{
return _SelStackBack.size();
}
/// Return the current forward selection stack size
int selStackForwardSize() const {return _SelStackForward.size();}
std::size_t selStackForwardSize() const
{
return _SelStackForward.size();
}
/** Obtain selected objects from stack
*

View File

@@ -1333,7 +1333,7 @@ void View3DInventorViewer::showRotationCenter(bool show)
auto material = new SoMaterial();
material->emissiveColor = SbColor(1, 0, 0);
material->transparency = 0.8;
material->transparency = 0.8F;
auto translation = new SoTranslation();
translation->translation.setValue(center);