Skip to content

Commit 42176bd

Browse files
committed
バグ修正
1 parent 38ed766 commit 42176bd

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

curve_editor/ce_wndproc.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,30 +225,28 @@ LRESULT CALLBACK wndproc_editor(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
225225
// (左クリックがされたとき)
226226
///////////////////////////////////////////
227227
case WM_LBUTTONDOWN:
228+
address = g_curve_id[g_config.current_id].pt_in_ctpt(cl_pt);
228229
// 値モード&制御点がクリックされたとき
229230
if (g_config.mode == ce::Config::Value && g_curve_value.point_in_ctpts(cl_pt) >= 1) {
230231
move_pt = g_curve_value.point_in_ctpts(cl_pt);
231232
g_curve_value_previous = g_curve_value;
232233
::SetCursor(LoadCursor(NULL, IDC_HAND));
233234
::SetCapture(hwnd);
234235
}
235-
// 値モードでないとき
236-
else {
237-
// カーソルが制御点上にあるかどうか
238-
address = g_curve_id[g_config.current_id].pt_in_ctpt(cl_pt);
236+
// IDモードのとき
237+
else if (g_config.mode == ce::Config::ID && address.position != ce::Point_Address::Null) {
239238
// カーソルが制御点上にあるとき,ハンドルの座標を記憶
240-
if (address.position != ce::Point_Address::Null) {
241-
g_curve_id[g_config.current_id].move_point(address, gr_pt, TRUE);
242-
g_curve_id_previous = g_curve_id[g_config.current_id];
243-
::SetCursor(LoadCursor(NULL, IDC_HAND));
244-
::SetCapture(hwnd);
245-
}
246-
// カーブのD&D処理
247-
else {
248-
is_dragging = TRUE;
249-
::SetCapture(hwnd);
250-
}
239+
g_curve_id[g_config.current_id].move_point(address, gr_pt, TRUE);
240+
g_curve_id_previous = g_curve_id[g_config.current_id];
241+
::SetCursor(LoadCursor(NULL, IDC_HAND));
242+
::SetCapture(hwnd);
251243
}
244+
// カーブのD&D処理
245+
else {
246+
is_dragging = TRUE;
247+
::SetCapture(hwnd);
248+
}
249+
252250
return 0;
253251

254252
///////////////////////////////////////////

0 commit comments

Comments
 (0)