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

Fixed issue #23 by checking that a profile is selected before saving … #32

Merged
merged 1 commit into from
Sep 3, 2017
Merged
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
11 changes: 10 additions & 1 deletion functions.au3
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,11 @@ EndFunc
; Return value....:
;------------------------------------------------------------------------------
Func _delete($name="")
;check to make sure a profile is selected
If ControlListView($hgui, "", $list_profiles, "GetSelectedCount") = 0 Then
_setStatus("No profile is selected!", 1)
Return 1
EndIf
$profileName = StringReplace( GUICtrlRead(GUICtrlRead($list_profiles)), "|", "")
$selIndex = ControlListView($hgui, "", $list_profiles, "GetSelected")

Expand Down Expand Up @@ -965,7 +970,11 @@ EndFunc
; Return value....:
;------------------------------------------------------------------------------
Func _save()
;$yesno = MsgBox($MB_YESNO,"Warning!","The profile name already exists!" & @CRLF & "Do you wish to overwrite the profile?")
;check to make sure a profile is selected
If ControlListView($hgui, "", $list_profiles, "GetSelectedCount") = 0 Then
_setStatus("No profile is selected!", 1)
Return 1
EndIf
$profileName = StringReplace( GUICtrlRead(GUICtrlRead($list_profiles)), "|", "")

Local $aSection = Profiles_CreateSection()
Expand Down