Skip to content

Commit b51ca23

Browse files
macevhiczMHendricks
authored andcommitted
Don't select text when running workbox line without selection
1 parent 0ae2b95 commit b51ca23

File tree

4 files changed

+1
-18
lines changed

4 files changed

+1
-18
lines changed

preditor/gui/loggerwindow.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ def recordPrefs(self, manual=False):
797797
'spellCheckEnabled': self.uiSpellCheckEnabledACT.isChecked(),
798798
'wordWrap': self.uiWordWrapACT.isChecked(),
799799
'clearBeforeRunning': self.uiClearBeforeRunningACT.isChecked(),
800-
'uiSelectTextACT': self.uiSelectTextACT.isChecked(),
801800
'toolbarStates': str(self.saveState().toHex(), 'utf-8'),
802801
'consoleFont': self.console().font().toString(),
803802
'uiAutoSaveSettingssACT': self.uiAutoSaveSettingssACT.isChecked(),
@@ -966,7 +965,6 @@ def restorePrefs(self):
966965
self.setWordWrap(self.uiWordWrapACT.isChecked())
967966
self.uiClearBeforeRunningACT.setChecked(pref.get('clearBeforeRunning', False))
968967
self.setClearBeforeRunning(self.uiClearBeforeRunningACT.isChecked())
969-
self.uiSelectTextACT.setChecked(pref.get('uiSelectTextACT', True))
970968

971969
self._stylesheet = pref.get('currentStyleSheet', 'Bright')
972970
if self._stylesheet == 'Custom':

preditor/gui/ui/loggerwindow.ui

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
<addaction name="separator"/>
143143
<addaction name="uiClearBeforeRunningACT"/>
144144
<addaction name="uiClearToLastPromptACT"/>
145-
<addaction name="uiSelectTextACT"/>
146145
<addaction name="uiRunFirstWorkboxACT"/>
147146
</widget>
148147
<widget class="QMenu" name="uiOptionsMENU">
@@ -947,17 +946,6 @@ at the indicated line in the specified text editor.
947946
<string>Ctrl+Shift+F</string>
948947
</property>
949948
</action>
950-
<action name="uiSelectTextACT">
951-
<property name="checkable">
952-
<bool>true</bool>
953-
</property>
954-
<property name="checked">
955-
<bool>true</bool>
956-
</property>
957-
<property name="text">
958-
<string>Select text when Run Selected w/o selection</string>
959-
</property>
960-
</action>
961949
<action name="uiWorkboxAutoCompleteEnabledACT">
962950
<property name="checkable">
963951
<bool>true</bool>

preditor/gui/workbox_text_edit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def __selected_text__(self, start_of_line=False, selectText=False):
113113
if cursor.selection().isEmpty():
114114
text = cursor.block().text()
115115

116-
selectText = self.window().uiSelectTextACT.isChecked() or selectText
117116
if selectText:
118117
cursor.select(QTextCursor.SelectionType.LineUnderCursor)
119118
self.setTextCursor(cursor)

preditor/gui/workboxwidget.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,8 @@ def __selected_text__(self, start_of_line=False, selectText=False):
160160
line, index = self.getCursorPosition()
161161
txt = self.text(line)
162162

163-
lineLength = len(self.text(line).rstrip())
164-
selectText = self.window().uiSelectTextACT.isChecked() or selectText
165-
166163
if selectText:
164+
lineLength = len(self.text(line).rstrip())
167165
self.setSelection(line, 0, line, lineLength)
168166

169167
elif start_of_line:

0 commit comments

Comments
 (0)