File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88# guitest: show
99
10- from guidata .configtools import get_icon
11- from guidata .qthelpers import (
12- add_actions ,
13- create_toolbutton ,
14- exec_dialog ,
15- qt_app_context ,
16- )
10+ from guidata .qthelpers import exec_dialog , qt_app_context
1711from qtpy import QtWidgets as QW
1812
1913from plotpy .tests .widgets .test_rotatecrop import create_test_data , imshow
@@ -35,24 +29,12 @@ def dialog_test(fname):
3529 """Test the flip/rotate dialog with rotation point changeable"""
3630 array0 , item = create_test_data (fname )
3731 dlg = FlipRotateDialog (None , toolbar = True )
38- tool = dlg .manager .add_tool (
32+ dlg .manager .add_tool (
3933 RotationCenterTool ,
4034 rotation_center = False ,
4135 rotation_point_move_with_shape = True ,
4236 on_all_items = True ,
43- toolbar_id = None ,
4437 )
45- action = tool .action
46-
47- rot_point_btn = create_toolbutton (
48- dlg .plot_widget , icon = get_icon ("rotationcenter.jpg" )
49- )
50- rot_point_btn .setPopupMode (QW .QToolButton .InstantPopup )
51- rotation_tool_menu = QW .QMenu (dlg .plot_widget )
52- add_actions (rotation_tool_menu , (action ,))
53- rot_point_btn .setMenu (rotation_tool_menu )
54- dlg .toolbar .addWidget (rot_point_btn )
55-
5638 dlg .transform .set_item (item )
5739 if exec_dialog (dlg ) == QW .QDialog .Accepted :
5840 array1 = dlg .transform .get_result ()
You can’t perform that action at this time.
0 commit comments