diff --git a/ogl_editor/src/Editor.c b/ogl_editor/src/Editor.c index 62d71f9..10687cf 100644 --- a/ogl_editor/src/Editor.c +++ b/ogl_editor/src/Editor.c @@ -278,6 +278,7 @@ void Editor_create() s_editorData.trackData.startRow = 0; s_editorData.trackData.endRow = 10000; s_editorData.trackData.highlightRowStep = 8; + s_editorData.trackData.isPlaying = false; Emgui_setDefaultFont(); } @@ -1182,6 +1183,7 @@ static void onEnterCurrentValue() static void onPlay() { RemoteConnection_sendPauseCommand(!RemoteConnection_isPaused()); + getTrackData()->isPlaying = !RemoteConnection_isPaused(); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/ogl_editor/src/TrackData.h b/ogl_editor/src/TrackData.h index 2035f63..272ad66 100644 --- a/ogl_editor/src/TrackData.h +++ b/ogl_editor/src/TrackData.h @@ -73,6 +73,7 @@ typedef struct TrackData int endRow; int highlightRowStep; char* editText; + bool isPlaying; } TrackData; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/ogl_editor/src/TrackView.c b/ogl_editor/src/TrackView.c index 8e69e85..03c849b 100644 --- a/ogl_editor/src/TrackView.c +++ b/ogl_editor/src/TrackView.c @@ -342,10 +342,13 @@ static int renderChannel(struct TrackInfo* info, int startX, Track* trackData, b { if (drawColorButton(color, startX + 4, info->startY - colorbar_adjust, size)) { - Dialog_showColorPicker(&trackData->color); + if (!info->trackData->isPlaying) + { + Dialog_showColorPicker(&trackData->color); - if (trackData->color != color) - s_needsUpdate = true; + if (trackData->color != color) + s_needsUpdate = true; + } } } else