@@ -166,8 +166,9 @@ public void Draw(Graphics g = null, bool renewOutline = true)
166166 if ( ! SetProjection ( g ) )
167167 return ;
168168
169- g . Clear ( colorControlBackGround . Color ) ;
170169 g . SmoothingMode = SmoothingMode . AntiAlias ;
170+ g . Clear ( colorControlBackGround . Color ) ;
171+
171172 DrawOutline ( g ) ;
172173 DrawStereoNet ( g ) ;
173174 DrawCircles ( g ) ;
@@ -1187,8 +1188,9 @@ private void buttonAddIndex_Click(object sender, EventArgs e)
11871188
11881189 private void buttonRemoveIndex_Click ( object sender , EventArgs e )
11891190 {
1190- if ( listBoxSpecifiedIndices . SelectedIndex > - 1 )
1191- listBoxSpecifiedIndices . Items . RemoveAt ( listBoxSpecifiedIndices . SelectedIndex ) ;
1191+ var selectedIndex = listBoxSpecifiedIndices . SelectedIndex ;
1192+ if ( selectedIndex > - 1 && selectedIndex < ProjectedObjects . Count )
1193+ ProjectedObjects . RemoveAt ( listBoxSpecifiedIndices . SelectedIndex ) ;
11921194 setVector ( ) ;
11931195 Draw ( ) ;
11941196 }
@@ -1200,6 +1202,7 @@ private void buttonRemoveIndex_Click(object sender, EventArgs e)
12001202 /// <param name="e"></param>
12011203 private void listBoxSpecifiedIndices_DrawItem ( object sender , DrawItemEventArgs e )
12021204 {
1205+ e . Graphics . SmoothingMode = SmoothingMode . AntiAlias ;
12031206 //背景を描画する
12041207 //項目が選択されている時は強調表示される
12051208 e . DrawBackground ( ) ;
@@ -1217,7 +1220,7 @@ private void listBoxSpecifiedIndices_DrawItem(object sender, DrawItemEventArgs e
12171220 Brush b = new SolidBrush ( e . ForeColor ) ;
12181221
12191222 //文字列の描画
1220- if ( HexagonalLattice && checkBoxUseMillerBravaisIndex . Visible && checkBoxUseMillerBravaisIndex . Checked && radioButtonPlanes . Checked ) //ミラー・ブレイビス指数で表示
1223+ if ( HexagonalLattice && checkBoxUseMillerBravaisIndex . Visible && checkBoxUseMillerBravaisIndex . Checked && radioButtonPlanes . Checked ) //ミラー・ブレヴェ指数で表示
12211224 {
12221225 var ( h , k , l ) = row . Indices [ 0 ] ;
12231226 e . Graphics . DrawString ( $ "{ h } { k } { - h - k } { l } ", e . Font , b , new Rectangle ( e . Bounds . X + ih , e . Bounds . Y , e . Bounds . Width - ih , e . Bounds . Height ) ) ;
@@ -1521,7 +1524,6 @@ private void formStereonet_Resize(object sender, EventArgs e)
15211524 }
15221525
15231526 #endregion
1524-
15251527 private void checkBoxUseMillerBravais_CheckedChanged ( object sender , EventArgs e )
15261528 {
15271529 flowLayoutPanelI . Visible = HexagonalLattice && radioButtonPlanes . Checked && checkBoxUseMillerBravaisIndex . Checked && radioButtonSpecifiedIndices . Checked ;
0 commit comments