Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue#836 is solved - Prranith #876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions invesalius/gui/task_navigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ def __init__(self, parent, nav_hub):
top_sizer.AddMany([(start_button), (reset_button)])

bottom_sizer = wx.BoxSizer(wx.HORIZONTAL)
bottom_sizer.Add(next_button)
bottom_sizer.Add(next_button,0,wx.EXPAND | wx.TOP,65)

sizer = wx.GridBagSizer(5, 5)
sizer.Add(
self.btns_set_fiducial[0], # Left Ear
self.btns_set_fiducial[1], # Updated Right Ear
wx.GBPosition(1, 0),
span=wx.GBSpan(1, 2),
flag=wx.ALIGN_CENTER_VERTICAL,
Expand All @@ -448,7 +448,7 @@ def __init__(self, parent, nav_hub):
flag=wx.ALIGN_CENTER_HORIZONTAL,
)
sizer.Add(
self.btns_set_fiducial[1], # Right Ear
self.btns_set_fiducial[0], # Updated Right Ear
wx.GBPosition(1, 3),
span=wx.GBSpan(1, 2),
flag=wx.ALIGN_CENTER_VERTICAL,
Expand All @@ -460,7 +460,7 @@ def __init__(self, parent, nav_hub):
[
(top_sizer, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 10),
(sizer, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.LEFT | wx.RIGHT, 5),
(bottom_sizer, 0, wx.ALIGN_RIGHT | wx.RIGHT | wx.TOP, 30),
(bottom_sizer, 0, wx.ALIGN_RIGHT |wx.TOP, 30),
]
)
self.sizer = main_sizer
Expand Down Expand Up @@ -670,7 +670,7 @@ def __init__(self, parent, nav_hub):

sizer = wx.GridBagSizer(5, 5)
sizer.Add(
self.fiducial_buttons[0], # Left Ear
self.fiducial_buttons[1], #Updated Right One Ear
wx.GBPosition(1, 0),
span=wx.GBSpan(1, 2),
flag=wx.ALIGN_CENTER_VERTICAL,
Expand All @@ -682,7 +682,7 @@ def __init__(self, parent, nav_hub):
flag=wx.ALIGN_CENTER_HORIZONTAL,
)
sizer.Add(
self.fiducial_buttons[1], # Right Ear
self.fiducial_buttons[0], # Updated Left one Ear
wx.GBPosition(1, 3),
span=wx.GBSpan(1, 2),
flag=wx.ALIGN_CENTER_VERTICAL,
Expand Down Expand Up @@ -1040,7 +1040,6 @@ def __init__(self, parent, nav_hub):
(lbl, 1, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2),
(lbl_rec, 1, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2),
(self.help, 0, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 1),
(btn_rec, 0, wx.EXPAND | wx.ALL | wx.ALIGN_LEFT, 1),
]
)

Expand All @@ -1050,14 +1049,12 @@ def __init__(self, parent, nav_hub):
next_button.Bind(wx.EVT_BUTTON, partial(self.OnNext))

bottom_sizer = wx.BoxSizer(wx.HORIZONTAL)
bottom_sizer.Add(back_button)
bottom_sizer.Add(next_button)

main_sizer = wx.BoxSizer(wx.VERTICAL)
main_sizer.AddMany(
[
(border, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 1),
(bottom_sizer, 0, wx.ALIGN_CENTER | wx.CENTER | wx.TOP, 1),
(border, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 10),
(bottom_sizer, 0, wx.ALIGN_CENTER | wx.CENTER | wx.TOP, 10),
]
)

Expand Down Expand Up @@ -1111,24 +1108,30 @@ def __init__(self, parent, nav_hub):
self,
-1,
_(
f"Ready for navigation with {self.navigation.n_coils} coil{'' if self.navigation.n_coils == 1 else 's'}!"
),
f"Ready for navigation with {self.navigation.n_coils} "
f"coil{'' if self.navigation.n_coils == 1 else 's'}!" ),
)
# lbl.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.BOLD))
lbl.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.BOLD))
self.lbl = lbl

btn_edit = wx.Button(self, -1, _("Edit coil registration in Preferences"))
btn_edit = wx.Button(self, -1, _("Edit coil registration"))
btn_edit.SetToolTip("Open preferences menu")
btn_edit.Bind(wx.EVT_BUTTON, self.OnEditPreferences)

next_button = wx.Button(self, label="Proceed to navigation")
back_button = wx.Button(self, label="Back")
back_button.Bind(wx.EVT_BUTTON, partial(self.OnBack))

next_button = wx.Button(self, label="Next")
next_button.Bind(wx.EVT_BUTTON, partial(self.OnNext))
if not self.navigation.CoilSelectionDone():
self.lbl.SetLabel("Please select a coil registration")
next_button.Enable(False)
self.next_button = next_button

border.AddMany(
border.Add(lbl, 1, wx.EXPAND | wx.TOP, 10)

bottom_sizer = wx.BoxSizer(wx.HORIZONTAL)
bottom_sizer.AddMany(
[
(lbl, 1, wx.EXPAND),
(btn_edit, 1, wx.EXPAND),
Expand All @@ -1137,8 +1140,9 @@ def __init__(self, parent, nav_hub):
)

main_sizer = wx.BoxSizer(wx.VERTICAL)
main_sizer.Add(border, 0, wx.EXPAND, 5)

main_sizer.Add(border, 0, wx.CENTER | wx.ALL, 5)
main_sizer.AddSpacer(205)
main_sizer.Add(bottom_sizer, 0, wx.EXPAND | wx.ALL, 20)
self.SetSizerAndFit(main_sizer)
self.Layout()
self.__bind_events()
Expand All @@ -1164,6 +1168,8 @@ def CoilSelectionDone(self, done):

def OnEditPreferences(self, evt):
Publisher.sendMessage("Open preferences menu", page=3)
def OnBack(self, evt):
Publisher.sendMessage("Move to stylus page")

def OnNext(self, evt):
Publisher.sendMessage("Open navigation menu")
Expand Down
Binary file removed locale/be/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ca/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/cs/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/de/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/el/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/en/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/es/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/fa/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/fr/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/it/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ja/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ko/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ms/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/nl/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/pt/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/pt_BR/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ro/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ru/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/sr/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/tr_TR/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/ur_PK/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/uz/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/zh_CN/LC_MESSAGES/invesalius.mo
Binary file not shown.
Binary file removed locale/zh_TW/LC_MESSAGES/invesalius.mo
Binary file not shown.