Skip to content

Commit

Permalink
OWNomogram: Adjust scene rect
Browse files Browse the repository at this point in the history
  • Loading branch information
VesnaT committed Jan 31, 2017
1 parent 75de2c8 commit 4f09813
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Orange/widgets/visualize/ownomogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,11 @@ def __hide_attrs(self, n_show):
y = self.nomogram_main.layout.preferredHeight() + 30
self.vertical_line.setLine(x, -6, x, y)
self.hidden_vertical_line.setLine(x, -6, x, y)
self.scene.setSceneRect(QRectF(self.scene.sceneRect().x(),
self.scene.sceneRect().y(),
self.scene.itemsBoundingRect().width(),
self.nomogram.preferredSize().height()))
rect = QRectF(self.scene.sceneRect().x(),
self.scene.sceneRect().y(),
self.scene.itemsBoundingRect().width(),
self.nomogram.preferredSize().height())
self.scene.setSceneRect(rect.adjusted(0, 0, 70, 70))

def _sort_combo_changed(self):
if self.nomogram_main is None:
Expand Down Expand Up @@ -922,10 +923,11 @@ def update_scene(self):
nomogram.add_items([nomogram_head, self.nomogram_main, nomogram_foot])
self.scene.addItem(nomogram)
self.set_feature_marker_values()
self.scene.setSceneRect(QRectF(self.scene.itemsBoundingRect().x(),
self.scene.itemsBoundingRect().y(),
self.scene.itemsBoundingRect().width(),
self.nomogram.preferredSize().height()))
rect = QRectF(self.scene.itemsBoundingRect().x(),
self.scene.itemsBoundingRect().y(),
self.scene.itemsBoundingRect().width(),
self.nomogram.preferredSize().height())
self.scene.setSceneRect(rect.adjusted(0, 0, 70, 70))

def create_main_nomogram(self, name_items, points, max_width, point_text,
name_offset):
Expand Down

0 comments on commit 4f09813

Please sign in to comment.