fix(product-suite): enable original image drag sorting
This commit is contained in:
@@ -2797,8 +2797,10 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
|
||||
dropped = []
|
||||
pasted = []
|
||||
reordered = []
|
||||
original_list.filesDropped.connect(dropped.append)
|
||||
original_list.clipboardImage.connect(pasted.append)
|
||||
original_list.orderChanged.connect(reordered.append)
|
||||
|
||||
class DropEvent:
|
||||
def __init__(self, mime_data):
|
||||
@@ -2821,6 +2823,7 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
os.path.normcase(os.path.normpath(expected_path)),
|
||||
os.path.normcase(os.path.normpath(dropped[0][0])),
|
||||
)
|
||||
self.assertEqual([], reordered)
|
||||
|
||||
clipboard_image = QImage(24, 18, QImage.Format_RGB32)
|
||||
clipboard_image.fill(0xFF336699)
|
||||
@@ -2884,7 +2887,11 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
self.assertTrue(tab.select_all_originals_button.isEnabled())
|
||||
self.assertTrue(tab.invert_originals_button.isEnabled())
|
||||
for row in range(tab.original_list.count()):
|
||||
self.assertIsNotNone(tab.original_list.item(row).data(ORIGINAL_CHECK_STATE_ROLE))
|
||||
item = tab.original_list.item(row)
|
||||
self.assertIsNotNone(item.data(ORIGINAL_CHECK_STATE_ROLE))
|
||||
self.assertTrue(item.flags() & Qt.ItemIsDragEnabled)
|
||||
self.assertTrue(item.flags() & Qt.ItemIsDropEnabled)
|
||||
self.assertEqual(Qt.MoveAction, tab.original_list.defaultDropAction())
|
||||
|
||||
tab.select_all_originals_button.click()
|
||||
self.assertEqual([asset.id for asset in assets], tab.original_list.checked_asset_ids())
|
||||
|
||||
Reference in New Issue
Block a user