From 1e1874772e53e43f507dba64a15e9558bce793c3 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 1 Jul 2021 20:09:47 +0200 Subject: [PATCH] set family if nothing is selected --- openpype/tools/new_publisher/widgets.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openpype/tools/new_publisher/widgets.py b/openpype/tools/new_publisher/widgets.py index 37554f5e05..7ad13ae45d 100644 --- a/openpype/tools/new_publisher/widgets.py +++ b/openpype/tools/new_publisher/widgets.py @@ -241,6 +241,15 @@ class CreateDialog(QtWidgets.QDialog): item = existing_items[family] self.family_model.takeRow(item.row()) + if self.family_model.rowCount() < 1: + return + + # Make sure there is a selection + indexes = self.family_view.selectedIndexes() + if not indexes: + index = self.family_model.index(0, 0) + self.family_view.setCurrentIndex(index) + def _on_control_reset(self): self.refresh()