Skip to content

Commit

Permalink
PVS: fix some more coding flaws
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 7, 2019
1 parent 9e86ff4 commit 00f2bd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/Gui/QSint/actionpanel/actionlabel.cpp
Expand Up @@ -88,10 +88,8 @@ QSize ActionLabel::sizeHint() const
s = QString::fromLatin1("XXXX");
QFontMetrics fm = fontMetrics();
QSize sz = fm.size(Qt::TextShowMnemonic, s);
if(!empty || !w)
w += sz.width();
if(!empty || !h)
h = qMax(h, sz.height());
w += sz.width();
h = qMax(h, sz.height());
opt.rect.setSize(QSize(w, h)); // PM_MenuButtonIndicator depends on the height

if (!icon().isNull()) {
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Image/Gui/OpenGLImageBox.cpp
Expand Up @@ -302,8 +302,10 @@ void GLImageBox::getDisplayedImageAreaSize(int &dx, int &dy)
dx = 0;
dy = 0;
}
dx = ibrx - itlx + 1;
dy = ibry - itly + 1;
else {
dx = ibrx - itlx + 1;
dy = ibry - itly + 1;
}
}
}

Expand Down

0 comments on commit 00f2bd4

Please sign in to comment.