Skip to content

Commit

Permalink
[Proxy] Dialogs [Update] 0.1.6
Browse files Browse the repository at this point in the history
- Swap of selection logic so that individual layer selection is finally working as expected;
  • Loading branch information
kateliev committed Mar 13, 2024
1 parent 74dadff commit 8ed825f
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions Lib/typerig/proxy/fl/gui/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from typerig.proxy.fl.gui.styles import css_tr_button

# - Init ----------------------------------
__version__ = '0.1.5'
__version__ = '0.1.6'

# - Keep compatibility for basestring checks
try:
Expand Down Expand Up @@ -414,20 +414,20 @@ def table_check_all(self, layer_type=None, do_swap=False):
modifiers = QtGui.QApplication.keyboardModifiers() # Listen to Shift - reverses the ratio

for row in range(self.tab_masters.rowCount):
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)

def table_populate(self, mode, font=None, glyph=None):
if mode !=0:
Expand Down Expand Up @@ -555,20 +555,20 @@ def table_check_all(self, layer_type=None, do_swap=False):
modifiers = QtGui.QApplication.keyboardModifiers() # Listen to Shift - reverses the ratio

for row in range(self.tab_masters.rowCount):
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)

def table_populate(self, mode, font=None, glyph=None):
if mode !=0:
Expand Down

0 comments on commit 8ed825f

Please sign in to comment.