Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
70787ed8
Kaydet (Commit)
70787ed8
authored
Mar 16, 1998
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add option for no updates on dragging
üst
a114eb5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
StripViewer.py
Tools/pynche/StripViewer.py
+9
-11
No files found.
Tools/pynche/StripViewer.py
Dosyayı görüntüle @
70787ed8
...
...
@@ -123,7 +123,7 @@ class StripWidget(Pmw.MegaWidget):
canvas
.
pack
()
canvas
.
bind
(
'<ButtonRelease-1>'
,
self
.
__select_chip
)
canvas
.
bind
(
'<B1-Motion>'
,
self
.
__select_chip
)
canvas
.
bind
(
'<B1-Motion>'
,
self
.
__
drag_
select_chip
)
# Load a proc into the Tcl interpreter. This is used in the
# set_color() method to speed up setting the chip colors.
...
...
@@ -162,6 +162,7 @@ class StripWidget(Pmw.MegaWidget):
assert
self
.
__axis
in
(
0
,
1
,
2
)
self
.
initialiseoptions
(
StripWidget
)
self
.
__delegate
=
self
[
'delegate'
]
self
.
__update_while_dragging
=
1
def
__set_color
(
self
):
rgbtuple
=
self
[
'color'
]
...
...
@@ -182,17 +183,11 @@ class StripWidget(Pmw.MegaWidget):
if
chip
and
(
1
<=
chip
[
0
]
<=
self
.
__numchips
):
color
=
self
.
__chips
[
chip
[
0
]
-
1
]
rgbtuple
=
ColorDB
.
rrggbb_to_triplet
(
color
)
self
.
__delegate
.
set_color
(
self
,
rgbtuple
)
## import profile
## import pstats
## import tempfile
## statfile = tempfile.mktemp()
## p = profile.Profile()
## p.runcall(self.__delegate.set_color, self, rgbtuple)
## p.dump_stats(statfile)
## s = pstats.Stats(statfile)
## s.strip_dirs().sort_stats('time').print_stats(10)
def
__drag_select_chip
(
self
,
event
=
None
):
if
self
.
__update_while_dragging
:
self
.
__select_chip
(
event
)
def
__set_delegate
(
self
):
self
.
__delegate
=
self
[
'delegate'
]
...
...
@@ -244,3 +239,6 @@ class StripWidget(Pmw.MegaWidget):
else
:
outline
=
'black'
self
.
__canvas
.
itemconfigure
(
chip
,
outline
=
outline
)
def
set_update_while_dragging
(
self
,
flag
):
self
.
__update_while_dragging
=
flag
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment