Skip to content

Commit

Permalink
Use the right values for rectangle to render the view (#7336)
Browse files Browse the repository at this point in the history
Fixes #6440
  • Loading branch information
adeas31 committed Mar 29, 2021
1 parent 3e17278 commit ebfaa08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -1721,7 +1721,7 @@ void LibraryTreeModel::loadLibraryTreeItemPixmap(LibraryTreeItem *pLibraryTreeIt
qreal bottom = pGraphicsView->mMergedCoOrdinateSystem.getBottom();
qreal right = pGraphicsView->mMergedCoOrdinateSystem.getRight();
qreal top = pGraphicsView->mMergedCoOrdinateSystem.getTop();
QRectF rectangle = QRectF(left, bottom, qFabs(left - right), qFabs(bottom - top));
QRectF rectangle = QRectF(qMin(left, right), qMin(bottom, top), qFabs(left - right), qFabs(bottom - top));
if (rectangle.width() < 1) {
rectangle = QRectF(-100.0, -100.0, 200.0, 200.0);
}
Expand Down

0 comments on commit ebfaa08

Please sign in to comment.